Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
import os, subprocess, gradio as gr
|
| 2 |
|
| 3 |
-
MODEL = "
|
| 4 |
-
URL = "https://huggingface.co/
|
| 5 |
|
| 6 |
def setup():
|
| 7 |
if not os.path.exists(MODEL):
|
|
@@ -16,9 +16,9 @@ setup()
|
|
| 16 |
|
| 17 |
def chat(prompt):
|
| 18 |
p = subprocess.Popen(
|
| 19 |
-
["./llama/main", "-m", MODEL, "-p", prompt, "-n", "200"],
|
| 20 |
stdout=subprocess.PIPE
|
| 21 |
)
|
| 22 |
return p.stdout.read().decode(errors="ignore")
|
| 23 |
|
| 24 |
-
gr.Interface(chat, gr.Textbox(label="Ask Dolphin"), gr.Textbox()).launch()
|
|
|
|
| 1 |
+
import os, subprocess, gradio as gr
|
| 2 |
|
| 3 |
+
MODEL = "Dolphin-X1-8B.Q4_K_M.gguf"
|
| 4 |
+
URL = "https://huggingface.co/dphn/Dolphin-X1-8B-GGUF/resolve/main/" + MODEL
|
| 5 |
|
| 6 |
def setup():
|
| 7 |
if not os.path.exists(MODEL):
|
|
|
|
| 16 |
|
| 17 |
def chat(prompt):
|
| 18 |
p = subprocess.Popen(
|
| 19 |
+
["./llama/bin/main", "-m", MODEL, "-p", prompt, "-n", "200"],
|
| 20 |
stdout=subprocess.PIPE
|
| 21 |
)
|
| 22 |
return p.stdout.read().decode(errors="ignore")
|
| 23 |
|
| 24 |
+
gr.Interface(chat, gr.Textbox(label="Ask Dolphin X1"), gr.Textbox()).launch()
|