Spaces:
Running
Running
Update steganography.py
Browse files- steganography.py +4 -4
steganography.py
CHANGED
@@ -121,7 +121,7 @@ def gradio_decode_fn(upload_audio):
|
|
121 |
logging.info(f"Generating spectrogram for audio:\n{upload_audio}\n")
|
122 |
return display_audio_spectrogram(upload_audio)
|
123 |
|
124 |
-
with gr.Blocks(title='Audio Steganography', theme=gr.themes.Soft(primary_hue="green", secondary_hue="green", spacing_size="sm", radius_size="lg")) as txt2spec:
|
125 |
with gr.Tab("Text to Spectrogram"):
|
126 |
with gr.Group():
|
127 |
text = gr.Textbox(lines=2, placeholder="Enter your text:", label="Text")
|
@@ -131,7 +131,7 @@ with gr.Blocks(title='Audio Steganography', theme=gr.themes.Soft(primary_hue="gr
|
|
131 |
max_font_size = gr.Slider(minimum=10, maximum=130, step=5, value=80, label="Font size")
|
132 |
margin = gr.Slider(minimum=0, maximum=50, step=1, value=10, label="Indent")
|
133 |
letter_spacing = gr.Slider(minimum=0, maximum=50, step=1, value=5, label="Letter spacing")
|
134 |
-
generate_button = gr.Button("Generate")
|
135 |
|
136 |
with gr.Column(variant='panel'):
|
137 |
with gr.Group():
|
@@ -144,7 +144,7 @@ with gr.Blocks(title='Audio Steganography', theme=gr.themes.Soft(primary_hue="gr
|
|
144 |
with gr.Group():
|
145 |
with gr.Row(variant='panel'):
|
146 |
upload_image = gr.Image(type="filepath", label="Upload image")
|
147 |
-
convert_button = gr.Button("Convert to audio")
|
148 |
|
149 |
with gr.Column(variant='panel'):
|
150 |
output_audio_from_image = gr.Audio(type="filepath", label="Generated audio")
|
@@ -155,7 +155,7 @@ with gr.Blocks(title='Audio Steganography', theme=gr.themes.Soft(primary_hue="gr
|
|
155 |
with gr.Group():
|
156 |
with gr.Row(variant='panel'):
|
157 |
upload_audio = gr.Audio(type="filepath", label="Upload audio", scale=3)
|
158 |
-
decode_button = gr.Button("Show spectrogram",
|
159 |
|
160 |
with gr.Column(variant='panel'):
|
161 |
decoded_image = gr.Image(type="filepath", label="Audio Spectrogram")
|
|
|
121 |
logging.info(f"Generating spectrogram for audio:\n{upload_audio}\n")
|
122 |
return display_audio_spectrogram(upload_audio)
|
123 |
|
124 |
+
with gr.Blocks(title='Audio Steganography', css="footer{display:none !important}", theme=gr.themes.Soft(primary_hue="green", secondary_hue="green", spacing_size="sm", radius_size="lg")) as txt2spec:
|
125 |
with gr.Tab("Text to Spectrogram"):
|
126 |
with gr.Group():
|
127 |
text = gr.Textbox(lines=2, placeholder="Enter your text:", label="Text")
|
|
|
131 |
max_font_size = gr.Slider(minimum=10, maximum=130, step=5, value=80, label="Font size")
|
132 |
margin = gr.Slider(minimum=0, maximum=50, step=1, value=10, label="Indent")
|
133 |
letter_spacing = gr.Slider(minimum=0, maximum=50, step=1, value=5, label="Letter spacing")
|
134 |
+
generate_button = gr.Button("Generate", variant='primary', size="lg")
|
135 |
|
136 |
with gr.Column(variant='panel'):
|
137 |
with gr.Group():
|
|
|
144 |
with gr.Group():
|
145 |
with gr.Row(variant='panel'):
|
146 |
upload_image = gr.Image(type="filepath", label="Upload image")
|
147 |
+
convert_button = gr.Button("Convert to audio", variant='primary', size="lg")
|
148 |
|
149 |
with gr.Column(variant='panel'):
|
150 |
output_audio_from_image = gr.Audio(type="filepath", label="Generated audio")
|
|
|
155 |
with gr.Group():
|
156 |
with gr.Row(variant='panel'):
|
157 |
upload_audio = gr.Audio(type="filepath", label="Upload audio", scale=3)
|
158 |
+
decode_button = gr.Button("Show spectrogram", variant='primary', size="lg")
|
159 |
|
160 |
with gr.Column(variant='panel'):
|
161 |
decoded_image = gr.Image(type="filepath", label="Audio Spectrogram")
|