Spaces:
Sleeping
Sleeping
Commit
·
14c2644
1
Parent(s):
957432c
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,18 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
def greet(name):
|
4 |
-
return "Hello " + name + "!!"
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
title = 'Question Answering APP'
|
4 |
+
context = "There are three bridges in the county. Two of them are covered."
|
5 |
+
question = "How many uncovered bridges are there?"
|
6 |
|
|
|
|
|
7 |
|
8 |
+
question_answerer = pipeline("question-answering")
|
9 |
+
#result = question_answerer(question = question, context=context)
|
10 |
+
#return result['answer']
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
interface = gr.Interface.from_pipeline(question_answerer,
|
16 |
+
title = title,
|
17 |
+
theme = "grass",
|
18 |
+
examples = [[context, question]]).launch()
|