Spaces:
Runtime error
Runtime error
philipp-zettl
commited on
Commit
•
9550e7f
1
Parent(s):
bcf8f78
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ pipe = pipeline("text2text-generation", model="philipp-zettl/t5-small-long-qa")
|
|
7 |
|
8 |
def generate(context, question):
|
9 |
prompt = f"question: {question} context: {context}"
|
10 |
-
return pipe(prompt)
|
11 |
|
12 |
demo = gr.Interface(fn=generate, inputs=[gr.Text('context'),gr.Text('question')], outputs="text")
|
13 |
demo.launch()
|
|
|
7 |
|
8 |
def generate(context, question):
|
9 |
prompt = f"question: {question} context: {context}"
|
10 |
+
return pipe(prompt)[0]['generated_text']
|
11 |
|
12 |
demo = gr.Interface(fn=generate, inputs=[gr.Text('context'),gr.Text('question')], outputs="text")
|
13 |
demo.launch()
|