Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import requests
|
|
| 4 |
API_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.1"
|
| 5 |
import os
|
| 6 |
headers = {"Authorization": f"Bearer {os.environ['HF_TOKEN']}"}
|
|
|
|
| 7 |
def chat(prompt, history=[]):
|
| 8 |
full_prompt = "\n".join([f"User: {msg[0]}\nAI: {msg[1]}" for msg in history])
|
| 9 |
full_prompt += f"\nUser: {prompt}\nAI:"
|
|
|
|
| 4 |
API_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.1"
|
| 5 |
import os
|
| 6 |
headers = {"Authorization": f"Bearer {os.environ['HF_TOKEN']}"}
|
| 7 |
+
|
| 8 |
def chat(prompt, history=[]):
|
| 9 |
full_prompt = "\n".join([f"User: {msg[0]}\nAI: {msg[1]}" for msg in history])
|
| 10 |
full_prompt += f"\nUser: {prompt}\nAI:"
|