Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -82,14 +82,14 @@ MD = """# ν¬μΌλͺ¬ ν΄μ¦ π¦
|
|
82 |
"""
|
83 |
|
84 |
with gr.Blocks() as demo:
|
85 |
-
with gr.Row():
|
86 |
-
gr.LoginButton()
|
87 |
-
gr.LogoutButton()
|
88 |
with gr.Row():
|
89 |
with gr.Column():
|
90 |
markdown = gr.Markdown(MD.format(content=''))
|
91 |
leader_board = gr.DataFrame(wrap=True, row_count=10)
|
92 |
-
|
|
|
|
|
|
|
93 |
quiz_count = gr.Radio([10, 20, 30, 40, 50], value=10, label="μ΄ ν΄μ¦ κ°μ", info="ν΄μ¦λ₯Ό λͺ κ° ν μμ μΈκ°μ?")
|
94 |
with gr.Column():
|
95 |
with gr.Row():
|
@@ -119,9 +119,10 @@ with gr.Blocks() as demo:
|
|
119 |
button3 = gr.Button(value="3λ²")
|
120 |
button4 = gr.Button(value="4λ²")
|
121 |
|
122 |
-
def respond(message, chat_history,
|
123 |
-
|
124 |
-
|
|
|
125 |
raise gr.Error("μ¬μ©μ μ΄λ¦μ μ
λ ₯νμΈμ.")
|
126 |
message = message.strip()
|
127 |
done = infos[user].done
|
|
|
82 |
"""
|
83 |
|
84 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
85 |
with gr.Row():
|
86 |
with gr.Column():
|
87 |
markdown = gr.Markdown(MD.format(content=''))
|
88 |
leader_board = gr.DataFrame(wrap=True, row_count=10)
|
89 |
+
with gr.Row():
|
90 |
+
gr.LoginButton()
|
91 |
+
gr.LogoutButton()
|
92 |
+
# user = gr.Dropdown(USERS, value="Anonymous", label="μ¬μ©μ", info="λΉμ μ λꡬμ κ°μ?", allow_custom_value=True)
|
93 |
quiz_count = gr.Radio([10, 20, 30, 40, 50], value=10, label="μ΄ ν΄μ¦ κ°μ", info="ν΄μ¦λ₯Ό λͺ κ° ν μμ μΈκ°μ?")
|
94 |
with gr.Column():
|
95 |
with gr.Row():
|
|
|
119 |
button3 = gr.Button(value="3λ²")
|
120 |
button4 = gr.Button(value="4λ²")
|
121 |
|
122 |
+
def respond(message, chat_history, quiz_count, gen, types, profile: Optional[gr.OAuthProfile]):
|
123 |
+
if profile:
|
124 |
+
user = profile.name
|
125 |
+
else:
|
126 |
raise gr.Error("μ¬μ©μ μ΄λ¦μ μ
λ ₯νμΈμ.")
|
127 |
message = message.strip()
|
128 |
done = infos[user].done
|