Upload folder using huggingface_hub
Browse files
demo.py
CHANGED
@@ -138,7 +138,10 @@ with gr.Blocks(theme=gr.themes.Monochrome(font=[gr.themes.GoogleFont("DM Sans"),
|
|
138 |
with gr.Row():
|
139 |
gr.Examples([f"{base}/{idx}.png" for idx in indices], inputs=input_image, outputs=[softmax, grad_cam], fn=predict, run_on_click=True)
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
|
|
|
|
|
|
|
138 |
with gr.Row():
|
139 |
gr.Examples([f"{base}/{idx}.png" for idx in indices], inputs=input_image, outputs=[softmax, grad_cam], fn=predict, run_on_click=True)
|
140 |
|
141 |
+
if args.local:
|
142 |
+
demo.launch(
|
143 |
+
share=False, debug=False, allowed_paths=[f"{base}"], server_name="0.0.0.0", # ssl_verify=False,
|
144 |
+
server_port=8000, # ssl_certfile="/workspace/openssl/cert.pem", ssl_keyfile="/workspace/openssl/key.pem"
|
145 |
+
)
|
146 |
+
else:
|
147 |
+
demo.launch(allowed_paths=[f"{base}"])
|