Spaces:
Runtime error
Runtime error
Yoon-gu Hwang
commited on
Commit
•
3b81ad0
1
Parent(s):
be55574
업데이트
Browse files
app.py
CHANGED
@@ -103,6 +103,7 @@ with gr.Blocks() as demo:
|
|
103 |
play = gr.Button(value="퀴즈 시작", label="퀴즈 시작")
|
104 |
skip = gr.Button(value="문제 넘어가기", label="문제 스킵")
|
105 |
chatbot = gr.Chatbot(bubble_full_width=False,
|
|
|
106 |
avatar_images=["https://huggingface.co/spaces/yoon-gu/pokemon/resolve/main/images/No_0001_이상해씨.png",
|
107 |
"https://huggingface.co/spaces/yoon-gu/pokemon/resolve/main/images/No_0155_브케인.png"])
|
108 |
with gr.Row():
|
@@ -113,6 +114,8 @@ with gr.Blocks() as demo:
|
|
113 |
button4 = gr.Button(value="4번")
|
114 |
|
115 |
def respond(message, chat_history, user, quiz_count, gen, types, request: gr.Request):
|
|
|
|
|
116 |
message = message.strip()
|
117 |
done = info[user]['done']
|
118 |
start, end = GEN_RANGE[gen]
|
|
|
103 |
play = gr.Button(value="퀴즈 시작", label="퀴즈 시작")
|
104 |
skip = gr.Button(value="문제 넘어가기", label="문제 스킵")
|
105 |
chatbot = gr.Chatbot(bubble_full_width=False,
|
106 |
+
height=600,
|
107 |
avatar_images=["https://huggingface.co/spaces/yoon-gu/pokemon/resolve/main/images/No_0001_이상해씨.png",
|
108 |
"https://huggingface.co/spaces/yoon-gu/pokemon/resolve/main/images/No_0155_브케인.png"])
|
109 |
with gr.Row():
|
|
|
114 |
button4 = gr.Button(value="4번")
|
115 |
|
116 |
def respond(message, chat_history, user, quiz_count, gen, types, request: gr.Request):
|
117 |
+
if user.strip() == "":
|
118 |
+
raise gr.Error("사용자 이름을 입력하세요.")
|
119 |
message = message.strip()
|
120 |
done = info[user]['done']
|
121 |
start, end = GEN_RANGE[gen]
|