Tonic commited on
Commit
2bce80d
1 Parent(s): 5be7f9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -3,9 +3,8 @@ from gradio_client import Client
3
 
4
  client = Client("https://tonic1-mistralmed-chat.hf.space/--replicas/5fr84/")
5
 
6
- user_input_with_token = user_input + " </s>"
7
-
8
  def predict(user_input):
 
9
  system_prompt = "[INST]You are MistralMed Created By Tonic-AI. You are a Very Helpful Assistant. You always provide a cautious answer, check your work, provide a long detailed answer.[/INST]"
10
 
11
  result = client.predict(
@@ -14,10 +13,8 @@ def predict(user_input):
14
  api_name="/predict"
15
  )
16
 
17
- # Return the result from the API
18
  return result
19
 
20
- # Define the Gradio interface with a title and description
21
  iface = gr.Interface(
22
  fn=predict,
23
  inputs=gr.Textbox(label="User Input"),
@@ -26,4 +23,4 @@ iface = gr.Interface(
26
  description="This app makes it easy for use [Tonic/mistralmed](Tonic/mistralmed) and also to make a discordbot. Join us on our active [builder's server on discord](https://discord.gg/9XK7zXR7Ke) [add this space as a discord bot on your server](https://discord.com/oauth2/authorize?client_id=1176628808212828231&scope=bot+applications.commands&permissions=326417525824) ."
27
  )
28
 
29
- iface.launch()
 
3
 
4
  client = Client("https://tonic1-mistralmed-chat.hf.space/--replicas/5fr84/")
5
 
 
 
6
  def predict(user_input):
7
+ user_input_with_token = user_input + " </s>"
8
  system_prompt = "[INST]You are MistralMed Created By Tonic-AI. You are a Very Helpful Assistant. You always provide a cautious answer, check your work, provide a long detailed answer.[/INST]"
9
 
10
  result = client.predict(
 
13
  api_name="/predict"
14
  )
15
 
 
16
  return result
17
 
 
18
  iface = gr.Interface(
19
  fn=predict,
20
  inputs=gr.Textbox(label="User Input"),
 
23
  description="This app makes it easy for use [Tonic/mistralmed](Tonic/mistralmed) and also to make a discordbot. Join us on our active [builder's server on discord](https://discord.gg/9XK7zXR7Ke) [add this space as a discord bot on your server](https://discord.com/oauth2/authorize?client_id=1176628808212828231&scope=bot+applications.commands&permissions=326417525824) ."
24
  )
25
 
26
+ iface.launch()