hysts HF staff commited on
Commit
6091f66
β€’
1 Parent(s): ec4a1e7
Files changed (4) hide show
  1. README.md +1 -1
  2. app.py +10 -4
  3. requirements.txt +4 -4
  4. style.css +1 -4
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ“ˆ
4
  colorFrom: green
5
  colorTo: indigo
6
  sdk: gradio
7
- sdk_version: 3.36.1
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(value="Run")
19
  with gr.Column():
20
- result = gr.Image(label="Result", type="numpy", elem_id="result")
21
- run_button.click(fn=model.predict, inputs=input_image, outputs=result)
22
- demo.queue().launch()
 
 
 
 
 
 
 
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.22.4
2
- opencv-python-headless==4.5.5.64
3
- torch==1.11.0
4
- torchvision==0.12.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
  }