Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), css="""footer {display:none !import
|
|
| 61 |
|
| 62 |
# Hidden session variables
|
| 63 |
user_id = gr.Textbox(visible=False)
|
| 64 |
-
notifier = gr.HTML(visible=False)
|
| 65 |
|
| 66 |
# Load user session
|
| 67 |
@chatblock.load(outputs=[user_id, notifier])
|
|
@@ -70,7 +70,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), css="""footer {display:none !import
|
|
| 70 |
|
| 71 |
# Creating user ID
|
| 72 |
new_id = str(uuid.uuid4())
|
| 73 |
-
print(f"Session started. User ID: {new_id}") #
|
| 74 |
user_dictionary[new_id] = []
|
| 75 |
|
| 76 |
# INSTRUCTIONS, instructions must be in quotations, \n means a new line to the AI (not needed).
|
|
|
|
| 61 |
|
| 62 |
# Hidden session variables
|
| 63 |
user_id = gr.Textbox(visible=False)
|
| 64 |
+
notifier = gr.HTML(visible=False) # If you embed this in html, this notifier is so you can catch and use the user_id in your script or url.
|
| 65 |
|
| 66 |
# Load user session
|
| 67 |
@chatblock.load(outputs=[user_id, notifier])
|
|
|
|
| 70 |
|
| 71 |
# Creating user ID
|
| 72 |
new_id = str(uuid.uuid4())
|
| 73 |
+
print(f"Session started. User ID: {new_id}") # Print User ID
|
| 74 |
user_dictionary[new_id] = []
|
| 75 |
|
| 76 |
# INSTRUCTIONS, instructions must be in quotations, \n means a new line to the AI (not needed).
|