hellokawei commited on
Commit
182027e
·
verified ·
1 Parent(s): 61b9cc3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -83,8 +83,8 @@ with gr.Blocks(title="Prompt-to-Image Generator") as demo:
83
  with gr.Column():
84
  desc_input = gr.Textbox(label="文本描述", placeholder="例如:空中的魔法树屋")
85
  style_dropdown = gr.Dropdown(
86
- choices=["幻想风格", "赛博朋克", "写实主义"],
87
- label="选择风格"
88
  )
89
  model_radio = gr.Radio(
90
  choices=["SD v1.5", "SDXL"],
@@ -96,16 +96,16 @@ with gr.Blocks(title="Prompt-to-Image Generator") as demo:
96
  label="Guidance Scale"
97
  )
98
  neg_text = gr.Textbox(
99
- label="反向提示词",
100
- placeholder="排除内容(如:低分辨率、水印)"
101
  )
102
- use_voice = gr.Checkbox(label="启用语音输入(加分项)")
103
- audio_input = gr.Audio(type="filepath", label="语音输入")
104
- generate_btn = gr.Button("生成图像")
105
 
106
  with gr.Column():
107
- prompt_output = gr.Textbox(label="生成的提示词")
108
- image_output = gr.Image(label="生成的图像")
109
 
110
  # 绑定语音转文字(仅当启用时)
111
  def conditional_transcribe(audio_path, use_voice_flag):
 
83
  with gr.Column():
84
  desc_input = gr.Textbox(label="文本描述", placeholder="例如:空中的魔法树屋")
85
  style_dropdown = gr.Dropdown(
86
+ choices=["Fancy", "Science", "Reality"],
87
+ label="choice"
88
  )
89
  model_radio = gr.Radio(
90
  choices=["SD v1.5", "SDXL"],
 
96
  label="Guidance Scale"
97
  )
98
  neg_text = gr.Textbox(
99
+ label="reverse_prompt",
100
+
101
  )
102
+ use_voice = gr.Checkbox(label="voice_input")
103
+ audio_input = gr.Audio(type="filepath", label="voice_input")
104
+ generate_btn = gr.Button("generate")
105
 
106
  with gr.Column():
107
+ prompt_output = gr.Textbox(label="generated prompt")
108
+ image_output = gr.Image(label="generated word")
109
 
110
  # 绑定语音转文字(仅当启用时)
111
  def conditional_transcribe(audio_path, use_voice_flag):