AFischer1985 commited on
Commit
3857659
·
1 Parent(s): e228074

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +3 -1
run.py CHANGED
@@ -16,7 +16,7 @@ def response(message, history, model):
16
  params={"max_length":500, "return_full_text":False} #, "stream":True
17
  url = f"https://api-inference.huggingface.co/models/{model_id}"
18
  correction=1
19
- prompt=f"[INST] {message} [/INST]"
20
  print("URL: "+url)
21
  print(params)
22
  print("User: "+message+"\nAI: ")
@@ -42,6 +42,8 @@ x=requests.get(f"https://api-inference.huggingface.co/framework/text-generation-
42
  x=[i["model_id"] for i in x.json()]
43
  x.insert(0,"Default")
44
  print(x)
 
 
45
 
46
  gr.ChatInterface(
47
  response,
 
16
  params={"max_length":500, "return_full_text":False} #, "stream":True
17
  url = f"https://api-inference.huggingface.co/models/{model_id}"
18
  correction=1
19
+ prompt=f"<s>[INST] {message} [/INST]"
20
  print("URL: "+url)
21
  print(params)
22
  print("User: "+message+"\nAI: ")
 
42
  x=[i["model_id"] for i in x.json()]
43
  x.insert(0,"Default")
44
  print(x)
45
+ x=[s for s in x if s.startswith("mistral")]
46
+ print(x)
47
 
48
  gr.ChatInterface(
49
  response,