Spaces:
Running
Running
Commit
·
bda1c4c
1
Parent(s):
81b2a65
fix
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +2 -5
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -409,11 +409,8 @@ def form_post(request: Request,response: Response,topic: str = Form(...)):
|
|
409 |
new_button_text = "Continue"
|
410 |
response.set_cookie(key="state", value=new_state)
|
411 |
return Template(html_template).render(idea="", error=error_message, reply_count=reply_count, button_text=new_button_text,loading_text=f"Generating content, Usually takes {queue_len*2}-{queue_len*3} minutes, please wait...")
|
412 |
-
else:
|
413 |
-
queue.put(user_id)
|
414 |
-
elif state == "continue":
|
415 |
-
queue.put(user_id)
|
416 |
|
|
|
417 |
new_state = "generate"
|
418 |
new_button_text = "Generate"
|
419 |
response.set_cookie(key="state", value=new_state)
|
@@ -453,4 +450,4 @@ def form_post(request: Request,response: Response,topic: str = Form(...)):
|
|
453 |
error_message = str(e)
|
454 |
# 从队列中移除当前用户
|
455 |
queue.get()
|
456 |
-
return Template(html_template).render(idea=idea, error=error_message, reply_count=reply_count, time_taken=time_taken,button_text=new_button_text,loading_text=loading_text)
|
|
|
409 |
new_button_text = "Continue"
|
410 |
response.set_cookie(key="state", value=new_state)
|
411 |
return Template(html_template).render(idea="", error=error_message, reply_count=reply_count, button_text=new_button_text,loading_text=f"Generating content, Usually takes {queue_len*2}-{queue_len*3} minutes, please wait...")
|
|
|
|
|
|
|
|
|
412 |
|
413 |
+
queue.put(user_id)
|
414 |
new_state = "generate"
|
415 |
new_button_text = "Generate"
|
416 |
response.set_cookie(key="state", value=new_state)
|
|
|
450 |
error_message = str(e)
|
451 |
# 从队列中移除当前用户
|
452 |
queue.get()
|
453 |
+
return Template(html_template).render(idea=idea, error=error_message, reply_count=reply_count, time_taken=time_taken,button_text=new_button_text,loading_text=loading_text)
|