kavansaun commited on
Commit
ae230b5
·
verified ·
1 Parent(s): de3e6e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -10,10 +10,13 @@ openai.api_key = os.getenv('OPENAI_KEY')
10
 
11
  # Creating UI using gradio Blocks. This line sets the block as a variable called "chatblock", the theme as monochrome, and removes the footer of the page.
12
  with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}") as chatblock:
 
 
13
  user_id = gr.Markdown(visible=False)
14
-
 
15
  @chatblock.load(outputs=[user_id])
16
- def load_user_id():
17
  global message_history
18
  global instructions
19
  message_history = []
 
10
 
11
  # Creating UI using gradio Blocks. This line sets the block as a variable called "chatblock", the theme as monochrome, and removes the footer of the page.
12
  with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}") as chatblock:
13
+
14
+ #Displaying the user id, it is made not-visible because the id hasnt been created yet.
15
  user_id = gr.Markdown(visible=False)
16
+
17
+ #When the chatblock loads we send the information from the following function below called "load_user" to "user_id".
18
  @chatblock.load(outputs=[user_id])
19
+ def load_user():
20
  global message_history
21
  global instructions
22
  message_history = []