Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -181,7 +181,7 @@ def polish_prompt_hf(original_prompt, img_list):
|
|
| 181 |
result = completion.choices[0].message.content
|
| 182 |
|
| 183 |
# Try to extract JSON if present
|
| 184 |
-
if '
|
| 185 |
try:
|
| 186 |
# Clean up the response
|
| 187 |
result = result.replace('```json', '').replace('```', '')
|
|
|
|
| 181 |
result = completion.choices[0].message.content
|
| 182 |
|
| 183 |
# Try to extract JSON if present
|
| 184 |
+
if '"Rewritten"' in result:
|
| 185 |
try:
|
| 186 |
# Clean up the response
|
| 187 |
result = result.replace('```json', '').replace('```', '')
|