Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from gpt4all import GPT4All
|
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
import subprocess
|
5 |
import asyncio
|
6 |
-
|
7 |
title = "Apollo-7B-GGUF Run On CPU"
|
8 |
|
9 |
description = """
|
@@ -53,9 +53,10 @@ async def generater(message, history, temperature, top_p, top_k):
|
|
53 |
|
54 |
# Debug: 打印最终的prompt以验证其正确性
|
55 |
print(f"Final prompt: {prompt}")
|
56 |
-
|
|
|
57 |
cmd = [
|
58 |
-
|
59 |
"-m", model_path+"/"+model_name,
|
60 |
"--prompt", prompt
|
61 |
]
|
|
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
import subprocess
|
5 |
import asyncio
|
6 |
+
import os
|
7 |
title = "Apollo-7B-GGUF Run On CPU"
|
8 |
|
9 |
description = """
|
|
|
53 |
|
54 |
# Debug: 打印最终的prompt以验证其正确性
|
55 |
print(f"Final prompt: {prompt}")
|
56 |
+
current_dir = os.path.dirname(os.path.realpath(__file__))
|
57 |
+
main_path = os.path.join(current_dir, 'main')
|
58 |
cmd = [
|
59 |
+
main_path,
|
60 |
"-m", model_path+"/"+model_name,
|
61 |
"--prompt", prompt
|
62 |
]
|