Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,4 +16,13 @@ def answer_question(context, question):
|
|
16 |
tokenizer.convert_ids_to_tokens(inputs["input_ids"][0][start:end])
|
17 |
)
|
18 |
return answer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
|
|
16 |
tokenizer.convert_ids_to_tokens(inputs["input_ids"][0][start:end])
|
17 |
)
|
18 |
return answer
|
19 |
+
import gradio as gr
|
20 |
+
|
21 |
+
def chatbot_response(question):
|
22 |
+
context = "Include a reliable medical knowledge base here like PubMed abstracts or simplified texts."
|
23 |
+
return answer_question(context, question)
|
24 |
+
|
25 |
+
iface = gr.Interface(fn=chatbot_response, inputs="text", outputs="text", title="Medical Chatbot")
|
26 |
+
iface.launch()
|
27 |
+
|
28 |
|