Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -306,7 +306,7 @@ async def generate_response_stream(messages: List[Dict[str,str]], max_tokens=600
|
|
| 306 |
while attempts < max_attempts:
|
| 307 |
attempts += 1
|
| 308 |
# Clear, explicit generation label for UI
|
| 309 |
-
yield f"data: {json.dumps({'status': f'Generating — LLM{attempts})...'})}\n\n"
|
| 310 |
await asyncio.sleep(0)
|
| 311 |
|
| 312 |
model_inputs = tokenizer(text_prompt, return_tensors="pt", truncation=True, max_length=4096).to(next(model.parameters()).device)
|
|
|
|
| 306 |
while attempts < max_attempts:
|
| 307 |
attempts += 1
|
| 308 |
# Clear, explicit generation label for UI
|
| 309 |
+
yield f"data: {json.dumps({'status': f'Generating — LLM {attempts})...'})}\n\n"
|
| 310 |
await asyncio.sleep(0)
|
| 311 |
|
| 312 |
model_inputs = tokenizer(text_prompt, return_tensors="pt", truncation=True, max_length=4096).to(next(model.parameters()).device)
|