Spaces:
Sleeping
Sleeping
IndianServers
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import tensorflow as tf
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
|
|
4 |
|
5 |
# Load the model
|
6 |
model = tf.saved_model.load('.')
|
@@ -21,4 +22,4 @@ image_input = gr.Image(type="pil")
|
|
21 |
label_output = gr.Label(num_top_classes=3)
|
22 |
|
23 |
interface = gr.Interface(fn=predict, inputs=image_input, outputs=label_output)
|
24 |
-
interface.launch()
|
|
|
1 |
import tensorflow as tf
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
+
import os
|
5 |
|
6 |
# Load the model
|
7 |
model = tf.saved_model.load('.')
|
|
|
22 |
label_output = gr.Label(num_top_classes=3)
|
23 |
|
24 |
interface = gr.Interface(fn=predict, inputs=image_input, outputs=label_output)
|
25 |
+
interface.launch(server_port=os.getenv('GRADIO_SERVER_PORT', 7860)) # Use environment variable for port
|