Update app.py
Browse files
app.py
CHANGED
|
@@ -277,10 +277,10 @@ import gradio as gr
|
|
| 277 |
from transformers import pipeline
|
| 278 |
import tensorflow
|
| 279 |
|
| 280 |
-
|
| 281 |
|
| 282 |
def main(input):
|
| 283 |
-
return
|
| 284 |
|
| 285 |
iface = gr.Interface(fn=main, inputs="text", outputs="text")
|
| 286 |
iface.launch()
|
|
|
|
| 277 |
from transformers import pipeline
|
| 278 |
import tensorflow
|
| 279 |
|
| 280 |
+
question_answer = pipeline("question-answering")
|
| 281 |
|
| 282 |
def main(input):
|
| 283 |
+
return question_answer(question=input, context=constitution)
|
| 284 |
|
| 285 |
iface = gr.Interface(fn=main, inputs="text", outputs="text")
|
| 286 |
iface.launch()
|