Niki Zhang commited on
Commit
d60d818
·
verified ·
1 Parent(s): 04b10c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -1094,6 +1094,7 @@ def handle_disliked(state,dislike_res):
1094
 
1095
  def get_style():
1096
  current_version = version.parse(gr.__version__)
 
1097
  if current_version <= version.parse('3.24.1'):
1098
  style = '''
1099
  #image_sketcher{min-height:500px}
@@ -1128,6 +1129,16 @@ def get_style():
1128
  .custom-output {
1129
  width: 30%;
1130
  }
 
 
 
 
 
 
 
 
 
 
1131
  '''
1132
  else:
1133
  style = None
@@ -1400,10 +1411,10 @@ def create_ui():
1400
 
1401
  with gr.Row(variant="panel") as text2image_model:
1402
 
1403
- with gr.Column():
1404
  with gr.Column():
1405
  gr.Radio([artist], label="Artist", info="Who is the artist?🧑‍🎨"),
1406
- gr.CheckboxGroup(["Oil Painting","Printmaking","Watercolor Painting","Drawing"], label="Art Forms", info="What are the art forms?🎨"),
1407
  gr.Radio(["Renaissance", "Baroque", "Impressionism","Modernism"], label="Period", info="Which art period?⏳"),
1408
  # to be done
1409
  gr.Dropdown(
@@ -1476,7 +1487,7 @@ def create_ui():
1476
  step=1,
1477
  value=8,
1478
  )
1479
- with gr.Column():
1480
  result = gr.Gallery(
1481
  label="Result",
1482
  columns=2,
@@ -1487,7 +1498,7 @@ def create_ui():
1487
  height="auto",
1488
  preview=True,
1489
  show_share_button=True,
1490
- show_download_button=True
1491
  )
1492
 
1493
 
 
1094
 
1095
  def get_style():
1096
  current_version = version.parse(gr.__version__)
1097
+ print(current_version)
1098
  if current_version <= version.parse('3.24.1'):
1099
  style = '''
1100
  #image_sketcher{min-height:500px}
 
1129
  .custom-output {
1130
  width: 30%;
1131
  }
1132
+ .custom-gallery {
1133
+ display: flex;
1134
+ flex-wrap: wrap;
1135
+ justify-content: space-between;
1136
+ }
1137
+
1138
+ .custom-gallery img {
1139
+ width: 48%;
1140
+ margin-bottom: 10px;
1141
+ }
1142
  '''
1143
  else:
1144
  style = None
 
1411
 
1412
  with gr.Row(variant="panel") as text2image_model:
1413
 
1414
+ with gr.Column(scale=0.4):
1415
  with gr.Column():
1416
  gr.Radio([artist], label="Artist", info="Who is the artist?🧑‍🎨"),
1417
+ gr.Radio(["Oil Painting","Printmaking","Watercolor Painting","Drawing"], label="Art Forms", info="What are the art forms?🎨"),
1418
  gr.Radio(["Renaissance", "Baroque", "Impressionism","Modernism"], label="Period", info="Which art period?⏳"),
1419
  # to be done
1420
  gr.Dropdown(
 
1487
  step=1,
1488
  value=8,
1489
  )
1490
+ with gr.Column(scale=0.6):
1491
  result = gr.Gallery(
1492
  label="Result",
1493
  columns=2,
 
1498
  height="auto",
1499
  preview=True,
1500
  show_share_button=True,
1501
+ show_download_button=True,
1502
  )
1503
 
1504