Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
from huggingface_hub import InferenceClient
|
2 |
import gradio as gr
|
|
|
|
|
|
|
3 |
|
4 |
client = InferenceClient(
|
5 |
"mistralai/Mistral-7B-Instruct-v0.1"
|
@@ -8,6 +11,7 @@ client = InferenceClient(
|
|
8 |
|
9 |
def format_prompt(message, history):
|
10 |
prompt = "<s>"
|
|
|
11 |
for user_prompt, bot_response in history:
|
12 |
prompt += f"[INST] {user_prompt} [/INST]"
|
13 |
prompt += f" {bot_response}</s> "
|
|
|
1 |
from huggingface_hub import InferenceClient
|
2 |
import gradio as gr
|
3 |
+
import os
|
4 |
+
APIKEY = os.environ["MT_TOKEN"]
|
5 |
+
EP = os.environ["MT_EP"]
|
6 |
|
7 |
client = InferenceClient(
|
8 |
"mistralai/Mistral-7B-Instruct-v0.1"
|
|
|
11 |
|
12 |
def format_prompt(message, history):
|
13 |
prompt = "<s>"
|
14 |
+
print(history)
|
15 |
for user_prompt, bot_response in history:
|
16 |
prompt += f"[INST] {user_prompt} [/INST]"
|
17 |
prompt += f" {bot_response}</s> "
|