jianghuyihei commited on
Commit
96c4785
1 Parent(s): 5366e5c
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -456,9 +456,9 @@ def form_post(request: Request,topic: str = Form(...), user_id: str = Form(...),
456
 
457
  script = script_template.format(user_id=user_id, state=state)
458
  if user_id in queue.queue:
459
- error_message = "Your request is being processed. Please wait for the result, or close the previous page and try again."
460
- script = script_template.format(user_id=user_id, state=state)
461
- return Template(html_template).render(idea="", error=error_message, reply_count=reply_count, button_text="Generate",loading_text="Generating content, Usually takes 3-4 minutes, please wait...",script=script)
462
 
463
  loading_text = "Generating content, Usually takes 3-4 minutes, please wait..."
464
  if state == "generate":
 
456
 
457
  script = script_template.format(user_id=user_id, state=state)
458
  if user_id in queue.queue:
459
+ # 如果用户在队列中,移除用户
460
+ queue.queue.remove(user_id)
461
+ state = "generate"
462
 
463
  loading_text = "Generating content, Usually takes 3-4 minutes, please wait..."
464
  if state == "generate":