darkc0de commited on
Commit
02fc8f1
·
verified ·
1 Parent(s): 933c736

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -127,10 +127,12 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", head=kofi_script, css=custom_css) as d
127
  gr.HTML('<img src="https://cdn-uploads.huggingface.co/production/uploads/6540a02d1389943fef4d2640/TVPNkZCjnaOwfzD4Ze9tj.png" alt="Header Image" style="display: block; margin-left: auto; margin-right: auto; max-width: 22%; height: auto;">')
128
 
129
  gr.ChatInterface(
130
- fn=respond, # The function to call when a message is sent
131
- chatbot=gr.Chatbot( # Configure the chatbot display area
132
- height=750, # Set the height of the chat history display to 800px
133
- label="XORTRON - Criminal Computing" # Set the label
 
 
134
  )
135
  )
136
 
@@ -146,7 +148,7 @@ if __name__ == "__main__":
146
  try:
147
  demo.queue(default_concurrency_limit=2)
148
 
149
- # The API is now disabled by setting api_open=False.
150
  demo.launch(api_open=False, share=False)
151
  except NameError as ne:
152
  print(f"Gradio demo could not be launched. 'client' might not have been initialized: {ne}")
 
127
  gr.HTML('<img src="https://cdn-uploads.huggingface.co/production/uploads/6540a02d1389943fef4d2640/TVPNkZCjnaOwfzD4Ze9tj.png" alt="Header Image" style="display: block; margin-left: auto; margin-right: auto; max-width: 22%; height: auto;">')
128
 
129
  gr.ChatInterface(
130
+ fn=respond,
131
+ chatbot=gr.Chatbot(
132
+ height=750,
133
+ label="XORTRON - Criminal Computing",
134
+ # FIX: Added type='messages' to resolve the UserWarning and use the modern format.
135
+ type='messages'
136
  )
137
  )
138
 
 
148
  try:
149
  demo.queue(default_concurrency_limit=2)
150
 
151
+ # FIX: Using the modern api_open parameter, which will work with the new requirements.txt
152
  demo.launch(api_open=False, share=False)
153
  except NameError as ne:
154
  print(f"Gradio demo could not be launched. 'client' might not have been initialized: {ne}")