Spaces:
Runtime error

DORINDESTRES commited on
Commit
f0f1835
·
verified ·
1 Parent(s): 0965dc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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:"