Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
title = 'BG Question Answering APP'
|
| 5 |
+
context = "My name is Bazed Gul. I love tea and drink it regularly"
|
| 6 |
+
question = "What do I love?"
|
| 7 |
+
|
| 8 |
+
question_answerer = pipeline("question-answering")
|
| 9 |
+
interface = gr.Interface.from_pipeline(question_answerer,
|
| 10 |
+
title = title,
|
| 11 |
+
theme = "grass",
|
| 12 |
+
examples = [[context, question]]).launch()
|