Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def load_model():
|
|
| 16 |
try:
|
| 17 |
print("📥 Downloading Model...", flush=True)
|
| 18 |
model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
| 19 |
-
llm = Llama(model_path=model_path, n_ctx=
|
| 20 |
print("✅ Model Ready!", flush=True)
|
| 21 |
return True
|
| 22 |
except Exception as e:
|
|
@@ -64,7 +64,7 @@ def chat(message, history_json, system_info, file_content):
|
|
| 64 |
|
| 65 |
response_obj = llm.create_chat_completion(
|
| 66 |
messages=messages,
|
| 67 |
-
max_tokens=
|
| 68 |
temperature=0.7
|
| 69 |
)
|
| 70 |
|
|
|
|
| 16 |
try:
|
| 17 |
print("📥 Downloading Model...", flush=True)
|
| 18 |
model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
|
| 19 |
+
llm = Llama(model_path=model_path, n_ctx=80000, n_threads=2, verbose=False)
|
| 20 |
print("✅ Model Ready!", flush=True)
|
| 21 |
return True
|
| 22 |
except Exception as e:
|
|
|
|
| 64 |
|
| 65 |
response_obj = llm.create_chat_completion(
|
| 66 |
messages=messages,
|
| 67 |
+
max_tokens=7000,
|
| 68 |
temperature=0.7
|
| 69 |
)
|
| 70 |
|