AFischer1985 commited on
Commit
14f05b9
·
1 Parent(s): 47131dc

Update app.py

Browse files

Update to mixtral-instruct

Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -4,7 +4,8 @@ import requests
4
  from llama_cpp import Llama
5
  import gradio as gr
6
 
7
- url="https://huggingface.co/TheBloke/WizardLM-13B-V1.2-GGUF/resolve/main/wizardlm-13b-v1.2.Q4_0.gguf"
 
8
  response = requests.get(url)
9
  with open("./model.gguf", mode="wb") as file:
10
  file.write(response.content)
@@ -23,7 +24,9 @@ def response(message, history):
23
  #url="https://afischer1985-wizardlm-13b-v1-2-q4-0-gguf.hf.space/v1/completions"
24
  url="http://0.0.0.0:2600/v1/completions"
25
  #body={"prompt":"Im Folgenden findest du eine Instruktion, die eine Aufgabe bescheibt. Schreibe eine Antwort, um die Aufgabe zu lösen.\n\n### Instruktion:\n"+message+"\n\n### Antwort:","max_tokens":500, "echo":"False","stream":"True"}
26
- body={"prompt":" chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n\nUSER:\n"+message+"\n\nASSISTANT:","max_tokens":500, "echo":"False","stream":"True"}
 
 
27
  response=""
28
  buffer=""
29
  print("URL: "+url)
 
4
  from llama_cpp import Llama
5
  import gradio as gr
6
 
7
+ #url="https://huggingface.co/TheBloke/WizardLM-13B-V1.2-GGUF/resolve/main/wizardlm-13b-v1.2.Q4_0.gguf"
8
+ url="https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q4_0.gguf?download=true"
9
  response = requests.get(url)
10
  with open("./model.gguf", mode="wb") as file:
11
  file.write(response.content)
 
24
  #url="https://afischer1985-wizardlm-13b-v1-2-q4-0-gguf.hf.space/v1/completions"
25
  url="http://0.0.0.0:2600/v1/completions"
26
  #body={"prompt":"Im Folgenden findest du eine Instruktion, die eine Aufgabe bescheibt. Schreibe eine Antwort, um die Aufgabe zu lösen.\n\n### Instruktion:\n"+message+"\n\n### Antwort:","max_tokens":500, "echo":"False","stream":"True"}
27
+ #body={"prompt":" chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n\nUSER:\n"+message+"\n\nASSISTANT:","max_tokens":500, "echo":"False","stream":"True"}
28
+ #body={"prompt":system+"### Instruktion:\n"+message+"\n\n### Antwort:","max_tokens":500, "echo":"False","stream":"True"} #e.g. SauerkrautLM
29
+ body={"prompt":"<s>[INST]"+message+"[/INST]### Antwort:","max_tokens":500, "echo":"False","stream":"True"} #e.g. Mixtral-Instruct
30
  response=""
31
  buffer=""
32
  print("URL: "+url)