Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
from gradio_client import Client
|
3 |
|
4 |
-
# Initialize the Gradio client
|
5 |
client = Client("https://tonic1-mistralmed-chat.hf.space/--replicas/srl2h/")
|
6 |
|
|
|
|
|
7 |
def predict(user_input):
|
8 |
-
system_prompt = "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."
|
9 |
|
10 |
result = client.predict(
|
11 |
-
|
12 |
system_prompt,
|
13 |
api_name="/predict"
|
14 |
)
|
|
|
1 |
import gradio as gr
|
2 |
from gradio_client import Client
|
3 |
|
|
|
4 |
client = Client("https://tonic1-mistralmed-chat.hf.space/--replicas/srl2h/")
|
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(
|
12 |
+
user_input_with_token,
|
13 |
system_prompt,
|
14 |
api_name="/predict"
|
15 |
)
|