Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 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):
|