Sanchit2207 commited on
Commit
f0c301d
·
verified ·
1 Parent(s): d182e77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
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