Spaces:
Running
on
Zero
Running
on
Zero
Update
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: green
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
4 |
colorFrom: green
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.36.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
app.py
CHANGED
@@ -15,8 +15,14 @@ with gr.Blocks(css="style.css") as demo:
|
|
15 |
with gr.Row():
|
16 |
with gr.Column():
|
17 |
input_image = gr.Image(label="Input", type="numpy")
|
18 |
-
run_button = gr.Button(
|
19 |
with gr.Column():
|
20 |
-
result = gr.Image(label="Result",
|
21 |
-
run_button.click(
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
with gr.Row():
|
16 |
with gr.Column():
|
17 |
input_image = gr.Image(label="Input", type="numpy")
|
18 |
+
run_button = gr.Button()
|
19 |
with gr.Column():
|
20 |
+
result = gr.Image(label="Result", elem_id="result")
|
21 |
+
run_button.click(
|
22 |
+
fn=model.predict,
|
23 |
+
inputs=input_image,
|
24 |
+
outputs=result,
|
25 |
+
)
|
26 |
+
|
27 |
+
if __name__ == "__main__":
|
28 |
+
demo.queue(max_size=20).launch()
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
numpy==1.
|
2 |
-
opencv-python-headless==4.
|
3 |
-
torch==
|
4 |
-
torchvision==0.
|
|
|
1 |
+
numpy==1.26.4
|
2 |
+
opencv-python-headless==4.10.0.82
|
3 |
+
torch==2.0.1
|
4 |
+
torchvision==0.15.2
|
style.css
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
h1 {
|
2 |
text-align: center;
|
|
|
3 |
}
|
4 |
div#result {
|
5 |
max-width: 600px;
|
6 |
max-height: 600px;
|
7 |
}
|
8 |
-
img#visitor-badge {
|
9 |
-
display: block;
|
10 |
-
margin: auto;
|
11 |
-
}
|
|
|
1 |
h1 {
|
2 |
text-align: center;
|
3 |
+
display: block;
|
4 |
}
|
5 |
div#result {
|
6 |
max-width: 600px;
|
7 |
max-height: 600px;
|
8 |
}
|
|
|
|
|
|
|
|