Spaces:
Running
Running
Update
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.36.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
app.py
CHANGED
@@ -22,12 +22,15 @@ with gr.Blocks(css="style.css") as demo:
|
|
22 |
with gr.Row():
|
23 |
input_image = gr.Image(label="Input Image", type="numpy")
|
24 |
with gr.Row():
|
25 |
-
run_button = gr.Button(
|
26 |
with gr.Column():
|
27 |
with gr.Row():
|
28 |
-
result = gr.Image(label="Result"
|
29 |
with gr.Row():
|
30 |
paths = sorted(pathlib.Path("images").glob("*.jpg"))
|
31 |
gr.Examples(examples=[[path.as_posix()] for path in paths], inputs=input_image)
|
32 |
run_button.click(fn=model.run, inputs=input_image, outputs=result, api_name="run")
|
33 |
-
|
|
|
|
|
|
|
|
22 |
with gr.Row():
|
23 |
input_image = gr.Image(label="Input Image", type="numpy")
|
24 |
with gr.Row():
|
25 |
+
run_button = gr.Button()
|
26 |
with gr.Column():
|
27 |
with gr.Row():
|
28 |
+
result = gr.Image(label="Result")
|
29 |
with gr.Row():
|
30 |
paths = sorted(pathlib.Path("images").glob("*.jpg"))
|
31 |
gr.Examples(examples=[[path.as_posix()] for path in paths], inputs=input_image)
|
32 |
run_button.click(fn=model.run, inputs=input_image, outputs=result, api_name="run")
|
33 |
+
|
34 |
+
|
35 |
+
if __name__ == "__main__":
|
36 |
+
demo.queue(max_size=20).launch()
|
model.py
CHANGED
@@ -22,8 +22,6 @@ Asher Chan
|
|
22 |
|
23 |
from __future__ import annotations
|
24 |
|
25 |
-
import os
|
26 |
-
|
27 |
import cv2
|
28 |
import huggingface_hub
|
29 |
import numpy as np
|
|
|
22 |
|
23 |
from __future__ import annotations
|
24 |
|
|
|
|
|
25 |
import cv2
|
26 |
import huggingface_hub
|
27 |
import numpy as np
|
style.css
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
h1 {
|
2 |
text-align: center;
|
|
|
3 |
}
|
4 |
img#overview {
|
5 |
max-width: 1000px;
|
@@ -7,11 +8,3 @@ img#overview {
|
|
7 |
display: block;
|
8 |
margin: auto;
|
9 |
}
|
10 |
-
div#result {
|
11 |
-
max-width: 500px;
|
12 |
-
max-height: 500px;
|
13 |
-
}
|
14 |
-
img#visitor-badge {
|
15 |
-
display: block;
|
16 |
-
margin: auto;
|
17 |
-
}
|
|
|
1 |
h1 {
|
2 |
text-align: center;
|
3 |
+
display: block;
|
4 |
}
|
5 |
img#overview {
|
6 |
max-width: 1000px;
|
|
|
8 |
display: block;
|
9 |
margin: auto;
|
10 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|