hysts HF staff commited on
Commit
4872e62
1 Parent(s): f2c9715
Files changed (4) hide show
  1. README.md +1 -1
  2. app.py +16 -4
  3. requirements.txt +3 -3
  4. style.css +1 -4
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🐨
4
  colorFrom: indigo
5
  colorTo: red
6
  sdk: gradio
7
- sdk_version: 3.36.1
8
  app_file: app.py
9
  pinned: false
10
  suggested_hardware: t4-small
 
4
  colorFrom: indigo
5
  colorTo: red
6
  sdk: gradio
7
+ sdk_version: 4.33.0
8
  app_file: app.py
9
  pinned: false
10
  suggested_hardware: t4-small
app.py CHANGED
@@ -77,7 +77,10 @@ with gr.Blocks(css="style.css") as demo:
77
  text = get_cluster_center_image_markdown(model_name3.value)
78
  cluster_center_images = gr.Markdown(value=text)
79
 
80
- model_name.change(fn=model.set_model, inputs=model_name)
 
 
 
81
  run_button.click(
82
  fn=model.set_model_and_generate_image,
83
  inputs=[
@@ -88,7 +91,16 @@ with gr.Blocks(css="style.css") as demo:
88
  ],
89
  outputs=result,
90
  )
91
- model_name2.change(fn=get_sample_image_markdown, inputs=model_name2, outputs=sample_images)
92
- model_name3.change(fn=get_cluster_center_image_markdown, inputs=model_name3, outputs=cluster_center_images)
 
 
 
 
 
 
 
 
93
 
94
- demo.queue(max_size=10).launch()
 
 
77
  text = get_cluster_center_image_markdown(model_name3.value)
78
  cluster_center_images = gr.Markdown(value=text)
79
 
80
+ model_name.change(
81
+ fn=model.set_model,
82
+ inputs=model_name,
83
+ )
84
  run_button.click(
85
  fn=model.set_model_and_generate_image,
86
  inputs=[
 
91
  ],
92
  outputs=result,
93
  )
94
+ model_name2.change(
95
+ fn=get_sample_image_markdown,
96
+ inputs=model_name2,
97
+ outputs=sample_images,
98
+ )
99
+ model_name3.change(
100
+ fn=get_cluster_center_image_markdown,
101
+ inputs=model_name3,
102
+ outputs=cluster_center_images,
103
+ )
104
 
105
+ if __name__ == "__main__":
106
+ demo.queue(max_size=10).launch()
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  lpips==0.1.4
2
- numpy==1.23.5
3
- Pillow==10.0.0
4
- scipy==1.10.1
5
  torch==2.0.1
6
  torchvision==0.15.2
 
1
  lpips==0.1.4
2
+ numpy==1.26.4
3
+ Pillow==10.3.0
4
+ scipy==1.13.1
5
  torch==2.0.1
6
  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
  }