ruslanmv commited on
Commit
8728056
1 Parent(s): 38b3be0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,7 +19,7 @@ model = AutoModelForCausalLM.from_pretrained(model_name).to(device)
19
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
20
  tokenizer.pad_token = tokenizer.eos_token
21
  @spaces.GPU
22
- def askme(Symptoms, Question):
23
  sys_message = '''\
24
  You are an AI Medical Assistant trained on a vast dataset of health information. Please be thorough and
25
  provide an informative answer. If you don't know the answer to a specific medical inquiry, advise seeking professional help.
@@ -44,10 +44,10 @@ question = '''\
44
  Could these symptoms be related to hypothyroidism?
45
  If so, what steps should I take to get a proper diagnosis and discuss treatment options?
46
  '''
47
- examples = [ {"Symptoms": symptoms, "Question": question}]
48
  iface = gr.Interface(
49
  fn=askme,
50
- inputs=["Symptoms", "Question"],
51
  outputs="text",
52
  examples = examples,
53
  title="Medical AI Chatbot",
 
19
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
20
  tokenizer.pad_token = tokenizer.eos_token
21
  @spaces.GPU
22
+ def askme(symptoms, question):
23
  sys_message = '''\
24
  You are an AI Medical Assistant trained on a vast dataset of health information. Please be thorough and
25
  provide an informative answer. If you don't know the answer to a specific medical inquiry, advise seeking professional help.
 
44
  Could these symptoms be related to hypothyroidism?
45
  If so, what steps should I take to get a proper diagnosis and discuss treatment options?
46
  '''
47
+ examples = [ {"symptoms": symptoms, "question": question}]
48
  iface = gr.Interface(
49
  fn=askme,
50
+ inputs=["symptoms", "question"],
51
  outputs="text",
52
  examples = examples,
53
  title="Medical AI Chatbot",