Spaces:
Sleeping
Sleeping
Update models/qwen.py
Browse files- models/qwen.py +3 -2
models/qwen.py
CHANGED
|
@@ -14,8 +14,9 @@ ocr_processor = None
|
|
| 14 |
|
| 15 |
|
| 16 |
def load_prompt():
|
| 17 |
-
with open("prompts/prompt.txt", "r", encoding="utf-8") as f:
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
def try_extract_json(text):
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
def load_prompt():
|
| 17 |
+
#with open("prompts/prompt.txt", "r", encoding="utf-8") as f:
|
| 18 |
+
# return f.read()
|
| 19 |
+
return os.getenv("PROMPT_TEXT", "⚠️ PROMPT_TEXT not found in secrets.")
|
| 20 |
|
| 21 |
|
| 22 |
def try_extract_json(text):
|