Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import os
|
| 3 |
import re
|
| 4 |
import json
|
|
@@ -55,7 +55,8 @@ def build_agent(model_path: str, n_ctx=8192, n_gpu_layers=81, n_batch=1024, flas
|
|
| 55 |
return agent, provider
|
| 56 |
|
| 57 |
JSON_FALLBACK_NAME = "project.txt"
|
| 58 |
-
|
|
|
|
| 59 |
def call_llm_manifest(agent, provider, text, temperature=0.2, top_p=0.9, top_k=40, repeat_penalty=1.1, max_tokens=2048):
|
| 60 |
# Instruction prompt. Model must respond with STRICT JSON.
|
| 61 |
prompt = f"""
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import os
|
| 3 |
import re
|
| 4 |
import json
|
|
|
|
| 55 |
return agent, provider
|
| 56 |
|
| 57 |
JSON_FALLBACK_NAME = "project.txt"
|
| 58 |
+
|
| 59 |
+
@spaces.GPU(duration=120)
|
| 60 |
def call_llm_manifest(agent, provider, text, temperature=0.2, top_p=0.9, top_k=40, repeat_penalty=1.1, max_tokens=2048):
|
| 61 |
# Instruction prompt. Model must respond with STRICT JSON.
|
| 62 |
prompt = f"""
|