Spaces:
Runtime error
Runtime error
fix: re-organize the ui
Browse files
app.py
CHANGED
@@ -249,15 +249,11 @@ def hello(profile: gr.OAuthProfile | None) -> str:
|
|
249 |
global USERNAME
|
250 |
if profile is None:
|
251 |
USERNAME = "guest"
|
252 |
-
return "I don't know you."
|
253 |
USERNAME = profile.name
|
254 |
return f"Hello {profile.name}"
|
255 |
|
256 |
with gr.Blocks(css=CSS) as demo:
|
257 |
-
|
258 |
-
gr.LoginButton()
|
259 |
-
gr.LogoutButton()
|
260 |
-
gr.Markdown().attach_load_event(hello, None)
|
261 |
|
262 |
with gr.Row():
|
263 |
with gr.Column():
|
@@ -266,6 +262,9 @@ with gr.Blocks(css=CSS) as demo:
|
|
266 |
PERSIAN GPT Trained by Mojtaba Valipour @ Data Analytics Lab
|
267 |
"""
|
268 |
)
|
|
|
|
|
|
|
269 |
|
270 |
chatbot.like(vote, None, None)
|
271 |
|
|
|
249 |
global USERNAME
|
250 |
if profile is None:
|
251 |
USERNAME = "guest"
|
252 |
+
return "I don't know you. Please login:"
|
253 |
USERNAME = profile.name
|
254 |
return f"Hello {profile.name}"
|
255 |
|
256 |
with gr.Blocks(css=CSS) as demo:
|
|
|
|
|
|
|
|
|
257 |
|
258 |
with gr.Row():
|
259 |
with gr.Column():
|
|
|
262 |
PERSIAN GPT Trained by Mojtaba Valipour @ Data Analytics Lab
|
263 |
"""
|
264 |
)
|
265 |
+
gr.LoginButton()
|
266 |
+
#gr.LogoutButton()
|
267 |
+
gr.Markdown().attach_load_event(hello, None)
|
268 |
|
269 |
chatbot.like(vote, None, None)
|
270 |
|