vishwesh21 commited on
Commit
d7e12a5
·
verified ·
1 Parent(s): d163cfb

updated model

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -2,10 +2,12 @@ import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
  """
5
- For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
 
6
  """
7
- client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
8
 
 
 
9
 
10
  def respond(
11
  message,
@@ -35,18 +37,19 @@ def respond(
35
  top_p=top_p,
36
  ):
37
  token = message.choices[0].delta.content
38
-
39
  response += token
40
  yield response
41
 
42
 
43
  """
44
- For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
 
45
  """
 
46
  demo = gr.ChatInterface(
47
  respond,
48
  additional_inputs=[
49
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
50
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
51
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
52
  gr.Slider(
@@ -59,6 +62,5 @@ demo = gr.ChatInterface(
59
  ],
60
  )
61
 
62
-
63
  if __name__ == "__main__":
64
  demo.launch()
 
2
  from huggingface_hub import InferenceClient
3
 
4
  """
5
+ For more information on `huggingface_hub` Inference API support, please check the docs:
6
+ https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
7
  """
 
8
 
9
+ # Change model here
10
+ client = InferenceClient("ritvik77/Medical_Doctor_AI_LoRA-Mistral-7B-Instruct_FullModel")
11
 
12
  def respond(
13
  message,
 
37
  top_p=top_p,
38
  ):
39
  token = message.choices[0].delta.content
 
40
  response += token
41
  yield response
42
 
43
 
44
  """
45
+ For information on how to customize the ChatInterface, peruse the gradio docs:
46
+ https://www.gradio.app/docs/chatinterface
47
  """
48
+
49
  demo = gr.ChatInterface(
50
  respond,
51
  additional_inputs=[
52
+ gr.Textbox(value="You are a friendly AI doctor who gives accurate medical advice.", label="System message"),
53
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
54
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
55
  gr.Slider(
 
62
  ],
63
  )
64
 
 
65
  if __name__ == "__main__":
66
  demo.launch()