Spaces:
Sleeping
Sleeping
jovian
commited on
Commit
·
a3ffc8f
1
Parent(s):
f4d4a0f
login
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
# from PIL import Image
|
| 7 |
# import plotly.graph_objects as go
|
| 8 |
# import torch
|
| 9 |
-
|
| 10 |
|
| 11 |
# device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 12 |
|
|
@@ -209,7 +209,7 @@
|
|
| 209 |
# """Process the uploaded image (if needed) and display it."""
|
| 210 |
# return image
|
| 211 |
|
| 212 |
-
|
| 213 |
# def apply_detection(image):
|
| 214 |
# """Run object detection on the uploaded image and return the annotated image."""
|
| 215 |
# # Convert image from PIL to NumPy array
|
|
@@ -894,10 +894,6 @@ with gr.Blocks(css = css,js=js_func) as demo:
|
|
| 894 |
""")
|
| 895 |
|
| 896 |
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
with gr.Row(visible=False) as input_row:
|
| 902 |
# Image Upload and Display in two columns
|
| 903 |
with gr.Column():
|
|
@@ -993,7 +989,7 @@ with gr.Blocks(css = css,js=js_func) as demo:
|
|
| 993 |
|
| 994 |
# Launch the Gradio interface
|
| 995 |
demo.queue()
|
| 996 |
-
demo.launch(share=True)
|
| 997 |
|
| 998 |
|
| 999 |
|
|
|
|
| 6 |
# from PIL import Image
|
| 7 |
# import plotly.graph_objects as go
|
| 8 |
# import torch
|
| 9 |
+
#import spaces
|
| 10 |
|
| 11 |
# device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 12 |
|
|
|
|
| 209 |
# """Process the uploaded image (if needed) and display it."""
|
| 210 |
# return image
|
| 211 |
|
| 212 |
+
#@spaces.GPU
|
| 213 |
# def apply_detection(image):
|
| 214 |
# """Run object detection on the uploaded image and return the annotated image."""
|
| 215 |
# # Convert image from PIL to NumPy array
|
|
|
|
| 894 |
""")
|
| 895 |
|
| 896 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 897 |
with gr.Row(visible=False) as input_row:
|
| 898 |
# Image Upload and Display in two columns
|
| 899 |
with gr.Column():
|
|
|
|
| 989 |
|
| 990 |
# Launch the Gradio interface
|
| 991 |
demo.queue()
|
| 992 |
+
demo.launch(share=True,show_api=False)
|
| 993 |
|
| 994 |
|
| 995 |
|