Spaces:
Running
Running
fix: port debug
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def process_image(sample_choice, uploaded_image, yolo_versions):
|
|
48 |
|
49 |
def start_netron_backend(model_file):
|
50 |
def serve_netron():
|
51 |
-
netron.start(model_file
|
52 |
|
53 |
# Launch Netron in a separate thread
|
54 |
threading.Thread(target=serve_netron, daemon=True).start()
|
@@ -63,7 +63,6 @@ def view_netron_model():
|
|
63 |
start_netron_backend(preloaded_model_file)
|
64 |
return '<iframe src="http://localhost:8080/" width="100%" height="600px"></iframe>'
|
65 |
|
66 |
-
|
67 |
# Custom CSS for styling (optional)
|
68 |
custom_css = """
|
69 |
#run_button {
|
@@ -139,4 +138,4 @@ with gr.Blocks(css=custom_css) as interface:
|
|
139 |
|
140 |
# Launch Gradio app
|
141 |
if __name__ == "__main__":
|
142 |
-
interface.launch(share=True
|
|
|
48 |
|
49 |
def start_netron_backend(model_file):
|
50 |
def serve_netron():
|
51 |
+
netron.start(model_file) # Start Netron without the 'port' argument
|
52 |
|
53 |
# Launch Netron in a separate thread
|
54 |
threading.Thread(target=serve_netron, daemon=True).start()
|
|
|
63 |
start_netron_backend(preloaded_model_file)
|
64 |
return '<iframe src="http://localhost:8080/" width="100%" height="600px"></iframe>'
|
65 |
|
|
|
66 |
# Custom CSS for styling (optional)
|
67 |
custom_css = """
|
68 |
#run_button {
|
|
|
138 |
|
139 |
# Launch Gradio app
|
140 |
if __name__ == "__main__":
|
141 |
+
interface.launch(share=False) # Changed share=True to share=False as Hugging Face Spaces doesn't support it.
|