xqt commited on
Commit
c5591c5
·
1 Parent(s): eb54863

UPD: Made some UI Changes and QoL Changes

Browse files
Files changed (2) hide show
  1. assets/wand-magic-sparkles-solid.svg +1 -0
  2. main.py +4 -5
assets/wand-magic-sparkles-solid.svg ADDED
main.py CHANGED
@@ -143,7 +143,7 @@ def save_image(prompt, image):
143
  repo_id = "xqt/fashion_model_generator",
144
  commit_message = f"ADD: prompt {temp_id}.json",
145
  )
146
- gradio.Info(f"Image and prompt saved successfully at https://huggingface.co/datasets/xqt/fashion_model_generator/tree/main/images/{year}/{month}/{day}/{hour}/{minute}/{temp_id}.png", duration = 5)
147
  os.remove(f"{temp_id}.png")
148
  os.remove(f"{temp_id}.json")
149
  return
@@ -159,10 +159,10 @@ with gradio.Blocks(fill_width = False) as app:
159
  api_token_input = gradio.Textbox(label = "Together AI API Key (key is never stored and it uses free models only)", placeholder = "Enter your Together AI API Key here.", type = "password")
160
 
161
  with gradio.Row(equal_height = True):
162
- with gradio.Column(scale = 3):
163
  prompt_input = gradio.Textbox(label = "Prompt", placeholder = "Enter your prompt here.")
164
- with gradio.Column():
165
- prompt_assist = gradio.Button(value = "Assisted Prompt Generation")
166
 
167
  image_output = gradio.Image(label="Generated Image")
168
 
@@ -176,4 +176,3 @@ with gradio.Blocks(fill_width = False) as app:
176
 
177
  if __name__ == "__main__":
178
  app.launch()
179
-
 
143
  repo_id = "xqt/fashion_model_generator",
144
  commit_message = f"ADD: prompt {temp_id}.json",
145
  )
146
+ gradio.Info(f"Image and prompt saved successfully <a href = \"https://huggingface.co/datasets/xqt/fashion_model_generator/blob/main/images/{year}/{month}/{day}/{hour}/{minute}/{temp_id}.png\"> here <\a>" , duration = 5)
147
  os.remove(f"{temp_id}.png")
148
  os.remove(f"{temp_id}.json")
149
  return
 
159
  api_token_input = gradio.Textbox(label = "Together AI API Key (key is never stored and it uses free models only)", placeholder = "Enter your Together AI API Key here.", type = "password")
160
 
161
  with gradio.Row(equal_height = True):
162
+ with gradio.Column(scale = 4):
163
  prompt_input = gradio.Textbox(label = "Prompt", placeholder = "Enter your prompt here.")
164
+ with gradio.Column(scale = 1):
165
+ prompt_assist = gradio.Button(value = "Prompt Assist", icon = "assets/wand-magic-sparkles-solid.svg")
166
 
167
  image_output = gradio.Image(label="Generated Image")
168
 
 
176
 
177
  if __name__ == "__main__":
178
  app.launch()