rsdmu commited on
Commit
ad1cd01
·
verified ·
1 Parent(s): d4c9123

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -9
app.py CHANGED
@@ -71,29 +71,47 @@ with gr.Blocks() as demo:
71
  with gr.Column(scale=1):
72
  img2 = gr.Image(label="Image 2")
73
 
74
- # Scores Row
75
  with gr.Row():
76
- # Left Scores
 
77
  with gr.Column(scale=1):
78
- label1 = gr.Textbox(label="Label 1", interactive=False)
79
  label1_score = gr.Number(label="Label 1 Score", interactive=False)
80
- label2 = gr.Textbox(label="Label 2", interactive=False)
 
 
 
 
 
81
  label2_score = gr.Number(label="Label 2 Score", interactive=False)
82
-
83
- # Right Scores
 
 
 
84
  with gr.Column(scale=1):
85
- label3 = gr.Textbox(label="Label 3", interactive=False)
86
  label3_score = gr.Number(label="Label 3 Score", interactive=False)
87
 
88
  # Prompt Row
89
  with gr.Row():
90
- prompt = gr.Textbox(label="Prompt", interactive=False)
 
91
 
92
  # Define Button Click Action
93
  show_button.click(
94
  show_image_pair,
95
  inputs=[pair_id_input],
96
- outputs=[img1, img2, prompt, label1, label1_score, label2, label2_score, label3, label3_score]
 
 
 
 
 
 
 
 
 
 
97
  )
98
 
99
  if __name__ == "__main__":
 
71
  with gr.Column(scale=1):
72
  img2 = gr.Image(label="Image 2")
73
 
74
+ # Label 1 and Label 1 Score Row
75
  with gr.Row():
76
+ with gr.Column(scale=2):
77
+ label1 = gr.Textbox(label="Label 1", interactive=False, lines=1)
78
  with gr.Column(scale=1):
 
79
  label1_score = gr.Number(label="Label 1 Score", interactive=False)
80
+
81
+ # Label 2 and Label 2 Score Row
82
+ with gr.Row():
83
+ with gr.Column(scale=2):
84
+ label2 = gr.Textbox(label="Label 2", interactive=False, lines=1)
85
+ with gr.Column(scale=1):
86
  label2_score = gr.Number(label="Label 2 Score", interactive=False)
87
+
88
+ # Label 3 and Label 3 Score Row
89
+ with gr.Row():
90
+ with gr.Column(scale=2):
91
+ label3 = gr.Textbox(label="Label 3", interactive=False, lines=1)
92
  with gr.Column(scale=1):
 
93
  label3_score = gr.Number(label="Label 3 Score", interactive=False)
94
 
95
  # Prompt Row
96
  with gr.Row():
97
+ with gr.Column(scale=3):
98
+ prompt = gr.Textbox(label="Prompt", interactive=False, lines=2)
99
 
100
  # Define Button Click Action
101
  show_button.click(
102
  show_image_pair,
103
  inputs=[pair_id_input],
104
+ outputs=[
105
+ img1,
106
+ img2,
107
+ prompt,
108
+ label1,
109
+ label1_score,
110
+ label2,
111
+ label2_score,
112
+ label3,
113
+ label3_score
114
+ ]
115
  )
116
 
117
  if __name__ == "__main__":