phenomenon1981 commited on
Commit
de8e8e9
1 Parent(s): ae96741

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -104,16 +104,22 @@ def send_it8(inputs, noise_level, proc1=proc1):
104
  return output8
105
 
106
 
107
- with gr.Blocks() as myface:
108
  with gr.Row():
109
-
110
  input_text=gr.Textbox(label="Short Prompt")
111
  see_prompts=gr.Button("Magic Prompt")
112
  with gr.Row():
 
 
 
113
 
114
- prompt=gr.Textbox(label="Enter Prompt")
 
 
115
  noise_level=gr.Slider(minimum=0.1, maximum=3, step=0.1, label="Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs.")
116
  run=gr.Button("Generate")
 
 
117
 
118
  with gr.Row():
119
  like_message = gr.Button("❤️❤️❤️ Press the Like Button if you enjoy my space! ❤️❤️❤️")
 
104
  return output8
105
 
106
 
107
+ def magic_prompt_section():
108
  with gr.Row():
 
109
  input_text=gr.Textbox(label="Short Prompt")
110
  see_prompts=gr.Button("Magic Prompt")
111
  with gr.Row():
112
+ prompt=gr.Textbox(label="Enter Prompt")
113
+ see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt])
114
+
115
 
116
+ with gr.Blocks() as myface:
117
+ magic_prompt_section()
118
+ with gr.Row():
119
  noise_level=gr.Slider(minimum=0.1, maximum=3, step=0.1, label="Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs.")
120
  run=gr.Button("Generate")
121
+ with gr.Row():
122
+ like_message = gr.Button("❤️❤️❤️ Press the Like Button if you enjoy my space! ❤️❤️❤️")
123
 
124
  with gr.Row():
125
  like_message = gr.Button("❤️❤️❤️ Press the Like Button if you enjoy my space! ❤️❤️❤️")