Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -127,12 +127,10 @@ 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,
|
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,8 +146,8 @@ if __name__ == "__main__":
|
|
148 |
try:
|
149 |
demo.queue(default_concurrency_limit=2)
|
150 |
|
151 |
-
#
|
152 |
-
demo.launch(
|
153 |
except NameError as ne:
|
154 |
print(f"Gradio demo could not be launched. 'client' might not have been initialized: {ne}")
|
155 |
except RuntimeError as re:
|
|
|
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 |
try:
|
147 |
demo.queue(default_concurrency_limit=2)
|
148 |
|
149 |
+
# CORRECTED LINE: Using show_api=False, which is the correct parameter for your Gradio version.
|
150 |
+
demo.launch(show_api=False, share=False)
|
151 |
except NameError as ne:
|
152 |
print(f"Gradio demo could not be launched. 'client' might not have been initialized: {ne}")
|
153 |
except RuntimeError as re:
|