p1atdev commited on
Commit
4cb2217
1 Parent(s): 38739b3

chore: add descriptions

Browse files
Files changed (1) hide show
  1. app.py +36 -22
app.py CHANGED
@@ -29,28 +29,42 @@ def predict(image: Image.Image) -> list[dict[str, float]]:
29
 
30
  def construct_ui():
31
  with gr.Blocks() as ui:
32
- with gr.Row():
33
- with gr.Column():
34
- input_image = gr.Image(
35
- label="Input Image",
36
- type="pil",
37
- source="upload",
38
- interactive=True,
39
- )
40
-
41
- submit_btn = gr.Button(
42
- value="Submit",
43
- variant="primary",
44
- )
45
-
46
- with gr.Column():
47
- result_salt = gr.Label(
48
- label=MODEL_SALT_BESTIMAGE,
49
- )
50
-
51
- result_cafe = gr.Label(
52
- label=MODEL_CAFE_AESTHETIC,
53
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  submit_btn.click(
56
  predict, inputs=[input_image], outputs=[result_salt, result_cafe]
 
29
 
30
  def construct_ui():
31
  with gr.Blocks() as ui:
32
+ gr.Markdown(
33
+ """
34
+
35
+ # Waifu Aesthetics
36
+
37
+ Original model repos:
38
+
39
+ - https://huggingface.co/saltacc/beit-bestimage-salt
40
+ - https://huggingface.co/cafeai/cafe_aesthetic
41
+
42
+ """
43
+ )
44
+
45
+ with gr.Column():
46
+ with gr.Row():
47
+ with gr.Column():
48
+ input_image = gr.Image(
49
+ label="Input Image",
50
+ type="pil",
51
+ source="upload",
52
+ interactive=True,
53
+ )
54
+
55
+ submit_btn = gr.Button(
56
+ value="Submit",
57
+ variant="primary",
58
+ )
59
+
60
+ with gr.Column():
61
+ result_salt = gr.Label(
62
+ label=MODEL_SALT_BESTIMAGE,
63
+ )
64
+
65
+ result_cafe = gr.Label(
66
+ label=MODEL_CAFE_AESTHETIC,
67
+ )
68
 
69
  submit_btn.click(
70
  predict, inputs=[input_image], outputs=[result_salt, result_cafe]