Spaces:
Runtime error
Runtime error
oskrmiguel
commited on
Commit
•
1663730
1
Parent(s):
0c2feb4
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
qa_model = pipeline(model="Evelyn18/distilbert-base-uncased-finetuned-squad")
|
5 |
+
contexto=st.text_area('Contexto')
|
6 |
+
pregunta=st.text_area('Pregunta')
|
7 |
+
|
8 |
+
# question = "Cuáles son los artículos ?"
|
9 |
+
# context = "En el regalmento de regimen académico los artículos que hablan de las becas son el 1 y 3"
|
10 |
+
|
11 |
+
if contexto:
|
12 |
+
out=qa_model(question = pregunta, context = contexto)
|
13 |
+
st.out
|