Spaces:
Paused
Paused
Fix indentation error on line 56
Browse files- model_loader.py +1 -2
model_loader.py
CHANGED
|
@@ -53,8 +53,7 @@ Email:
|
|
| 53 |
JSON Output:"""
|
| 54 |
|
| 55 |
result = pipe(prompt, max_new_tokens=256, temperature=0.1)[0]['generated_text'] # remove prompt part if included # Extract JSON from output if "JSON Output:" in result:
|
| 56 |
-
|
| 57 |
-
# Extract only the JSON object (find first { and matching })
|
| 58 |
if "{" in result:
|
| 59 |
start = result.index("{")
|
| 60 |
brace_count = 0
|
|
|
|
| 53 |
JSON Output:"""
|
| 54 |
|
| 55 |
result = pipe(prompt, max_new_tokens=256, temperature=0.1)[0]['generated_text'] # remove prompt part if included # Extract JSON from output if "JSON Output:" in result:
|
| 56 |
+
if "JSON Output:" in result: # Extract only the JSON object (find first { and matching })
|
|
|
|
| 57 |
if "{" in result:
|
| 58 |
start = result.index("{")
|
| 59 |
brace_count = 0
|