Spaces:
Running
Running
Update app.py
Browse files
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,
|
| 131 |
-
chatbot=gr.Chatbot(
|
| 132 |
-
height=750,
|
| 133 |
-
label="XORTRON - Criminal Computing"
|
|
|
|
|
|
|
| 134 |
)
|
| 135 |
)
|
| 136 |
|
|
@@ -146,7 +148,7 @@ if __name__ == "__main__":
|
|
| 146 |
try:
|
| 147 |
demo.queue(default_concurrency_limit=2)
|
| 148 |
|
| 149 |
-
#
|
| 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}")
|