kavansaun commited on
Commit
3e757bd
·
verified ·
1 Parent(s): 39a44f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ g = Github(os.getenv('GITHUB_KEY'))
12
  user_dictionary = {} #A dictionary that we can save mutible server side information. This will be formatted {new_id:message_history}
13
 
14
 
15
- with gr.Blocks(theme='davehornik/Tealy',css="footer{display:none !important}") as chatblock: # 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.
16
  user_id = gr.TextArea(visible=False) # Displaying the user id, it is made not-visible because the id hasnt been created yet and we dont want the user seeing it anyway.
17
 
18
  @chatblock.load(outputs=[user_id]) # When the chatblock loads we send the information from the following function "load_user" to "user_id".
@@ -87,7 +87,7 @@ with gr.Blocks(theme='davehornik/Tealy',css="footer{display:none !important}") a
87
  return gr.Textbox(value = None, show_label = False, placeholder = initial_message, container = False)
88
 
89
  initial_message = "Please write your prompt here and press 'enter'" # Initial message for the User Interface (basically the message for the typing input area so change the message under the quotes if you want to change that)
90
- Chatbot = gr.Chatbot(label="Anonymous User",layout=['bubble'],show_share_button = False,show_copy_button = False,show_api=False) # Creating a gradio-chatbot User Interface with the label "Anonymous User".
91
 
92
  txt = gr.Textbox(show_label = False, placeholder = initial_message, container = False)
93
 
 
12
  user_dictionary = {} #A dictionary that we can save mutible server side information. This will be formatted {new_id:message_history}
13
 
14
 
15
+ with gr.Blocks(theme='davehornik/Tealy',css="footer{display:none !important}",show_api=False).load(show_api=False) as chatblock: # 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.
16
  user_id = gr.TextArea(visible=False) # Displaying the user id, it is made not-visible because the id hasnt been created yet and we dont want the user seeing it anyway.
17
 
18
  @chatblock.load(outputs=[user_id]) # When the chatblock loads we send the information from the following function "load_user" to "user_id".
 
87
  return gr.Textbox(value = None, show_label = False, placeholder = initial_message, container = False)
88
 
89
  initial_message = "Please write your prompt here and press 'enter'" # Initial message for the User Interface (basically the message for the typing input area so change the message under the quotes if you want to change that)
90
+ Chatbot = gr.Chatbot(label="Anonymous User",layout=['bubble'],show_share_button = False,show_copy_button = False) # Creating a gradio-chatbot User Interface with the label "Anonymous User".
91
 
92
  txt = gr.Textbox(show_label = False, placeholder = initial_message, container = False)
93