Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -146,12 +146,11 @@ if __name__ == "__main__":
|
|
146 |
try:
|
147 |
demo.queue(default_concurrency_limit=2)
|
148 |
|
149 |
-
|
|
|
150 |
except NameError as ne:
|
151 |
print(f"Gradio demo could not be launched. 'client' might not have been initialized: {ne}")
|
152 |
except RuntimeError as re:
|
153 |
print(f"Gradio demo could not be launched due to an error during client initialization: {re}")
|
154 |
except Exception as e:
|
155 |
-
print(f"An unexpected error occurred when trying to launch Gradio demo: {e}")
|
156 |
-
|
157 |
-
|
|
|
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}")
|
153 |
except RuntimeError as re:
|
154 |
print(f"Gradio demo could not be launched due to an error during client initialization: {re}")
|
155 |
except Exception as e:
|
156 |
+
print(f"An unexpected error occurred when trying to launch Gradio demo: {e}")
|
|
|
|