Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import numpy as np
|
|
| 4 |
from transformers import AutoModelForQuestionAnswering
|
| 5 |
from transformers import pipeline
|
| 6 |
from transformers import AutoTokenizer
|
|
|
|
| 7 |
|
| 8 |
# Initializing the pipeline for the question answering model
|
| 9 |
question_answerer = pipeline("question-answering", model="Only-Mike/ADHD_Test_qa_model")
|
|
@@ -15,13 +16,5 @@ def question_answer(question, context):
|
|
| 15 |
|
| 16 |
gr.Interface(fn=question_answer, inputs=["text", "text"], outputs=["text"]).launch()
|
| 17 |
|
| 18 |
-
demo = gr.Blocks()
|
| 19 |
|
| 20 |
-
|
| 21 |
-
gr.Markdown('''### ADHD QA Bot
|
| 22 |
-
This space is build to showcase a fine-tuning of the distilbert-base-uncased and its abilities to answer questions.
|
| 23 |
-
Examples could be:
|
| 24 |
-
- Question = What is ADHD?
|
| 25 |
-
- Context = Attention-deficit/hyperactivity disorder (ADHD) is a neurodevelopmental disorder characterized by inattention, hyperactivity, and impulsivity.
|
| 26 |
-
''')
|
| 27 |
-
demo.launch()
|
|
|
|
| 4 |
from transformers import AutoModelForQuestionAnswering
|
| 5 |
from transformers import pipeline
|
| 6 |
from transformers import AutoTokenizer
|
| 7 |
+
from spaces_info import description
|
| 8 |
|
| 9 |
# Initializing the pipeline for the question answering model
|
| 10 |
question_answerer = pipeline("question-answering", model="Only-Mike/ADHD_Test_qa_model")
|
|
|
|
| 16 |
|
| 17 |
gr.Interface(fn=question_answer, inputs=["text", "text"], outputs=["text"]).launch()
|
| 18 |
|
|
|
|
| 19 |
|
| 20 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|