Spaces:
Sleeping
Sleeping
Commit
·
6c49eee
1
Parent(s):
36a2111
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from tqdm import tqdm
|
|
6 |
import ctransformers
|
7 |
import gradio as gr
|
8 |
|
9 |
-
if not os.path.isfile('llama-2-7b.ggmlv3.q4_K_S.bin'):
|
10 |
print("Downloading Model from HuggingFace")
|
11 |
url = "https://huggingface.co/TheBloke/Llama-2-7B-GGML/resolve/main/llama-2-7b.ggmlv3.q4_K_S.bin"
|
12 |
response = requests.get(url, stream=True)
|
@@ -49,5 +49,5 @@ def greet(question):
|
|
49 |
output, token_count = complete(f'User: {question}. Can you please answer this as informatively but concisely as possible.\nAssistant: ')
|
50 |
return f"Response: {output} | Tokens: {token_count}"
|
51 |
|
52 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text"
|
53 |
iface.launch(share=True)
|
|
|
6 |
import ctransformers
|
7 |
import gradio as gr
|
8 |
|
9 |
+
if not os.path.isfile('./llama-2-7b.ggmlv3.q4_K_S.bin'):
|
10 |
print("Downloading Model from HuggingFace")
|
11 |
url = "https://huggingface.co/TheBloke/Llama-2-7B-GGML/resolve/main/llama-2-7b.ggmlv3.q4_K_S.bin"
|
12 |
response = requests.get(url, stream=True)
|
|
|
49 |
output, token_count = complete(f'User: {question}. Can you please answer this as informatively but concisely as possible.\nAssistant: ')
|
50 |
return f"Response: {output} | Tokens: {token_count}"
|
51 |
|
52 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
53 |
iface.launch(share=True)
|