Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- app.py +40 -5
- requirements.txt +1 -5
app.py
CHANGED
@@ -188,15 +188,50 @@ async def process_podcast(input_text, language, speaker1, speaker2, api_key):
|
|
188 |
return podcast_script, audio_file
|
189 |
|
190 |
custom_css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
.gen-button {
|
192 |
border-radius: 10px !important;
|
193 |
background-color: #ff4081 !important;
|
|
|
|
|
|
|
194 |
}
|
195 |
.gen-button:hover {
|
196 |
background-color: #f50057 !important;
|
|
|
197 |
}
|
198 |
-
.
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
}
|
201 |
"""
|
202 |
|
@@ -257,9 +292,9 @@ with gr.Blocks(theme=gr.themes.Monochrome(), css=custom_css) as iface:
|
|
257 |
with gr.Row():
|
258 |
generate_button = gr.Button("ηζ", scale=2, elem_classes="gen-button")
|
259 |
api_key = gr.Textbox(label="API Key", type="password", placeholder="API authentication key for large language models", scale=1)
|
260 |
-
|
261 |
-
audio_output = gr.Audio(label="
|
262 |
-
podcast_script = gr.Textbox(label="
|
263 |
generate_button.click(fn=process_podcast, inputs=[input_text, Language, Speaker_1, Speaker_2, api_key], outputs=[podcast_script, audio_output])
|
264 |
|
265 |
if __name__ == "__main__":
|
|
|
188 |
return podcast_script, audio_file
|
189 |
|
190 |
custom_css = """
|
191 |
+
body {
|
192 |
+
background-color: #f0f8ff;
|
193 |
+
}
|
194 |
+
.gradio-container {
|
195 |
+
background-color: #ffffff;
|
196 |
+
border-radius: 20px;
|
197 |
+
box-shadow: 0 0 20px rgba(0,0,0,0.1);
|
198 |
+
}
|
199 |
+
.center-aligned {
|
200 |
+
text-align: center !important;
|
201 |
+
color: #ff4081;
|
202 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
|
203 |
+
}
|
204 |
.gen-button {
|
205 |
border-radius: 10px !important;
|
206 |
background-color: #ff4081 !important;
|
207 |
+
color: white !important;
|
208 |
+
font-weight: bold !important;
|
209 |
+
transition: all 0.3s ease !important;
|
210 |
}
|
211 |
.gen-button:hover {
|
212 |
background-color: #f50057 !important;
|
213 |
+
transform: scale(1.05);
|
214 |
}
|
215 |
+
.gr-input, .gr-box, .gr-dropdown {
|
216 |
+
border-radius: 10px !important;
|
217 |
+
border: 2px solid #ff4081 !important;
|
218 |
+
}
|
219 |
+
.gr-input:focus, .gr-box:focus, .gr-dropdown:focus {
|
220 |
+
border-color: #f50057 !important;
|
221 |
+
box-shadow: 0 0 0 2px rgba(245,0,87,0.2) !important;
|
222 |
+
}
|
223 |
+
.gr-form {
|
224 |
+
background-color: #fff0f5;
|
225 |
+
border-radius: 15px;
|
226 |
+
padding: 20px;
|
227 |
+
margin-top: 20px;
|
228 |
+
}
|
229 |
+
.gr-button {
|
230 |
+
background-color: #4caf50 !important;
|
231 |
+
color: white !important;
|
232 |
+
}
|
233 |
+
.gr-button:hover {
|
234 |
+
background-color: #45a049 !important;
|
235 |
}
|
236 |
"""
|
237 |
|
|
|
292 |
with gr.Row():
|
293 |
generate_button = gr.Button("ηζ", scale=2, elem_classes="gen-button")
|
294 |
api_key = gr.Textbox(label="API Key", type="password", placeholder="API authentication key for large language models", scale=1)
|
295 |
+
|
296 |
+
audio_output = gr.Audio(label="Generated Podcast Audio")
|
297 |
+
podcast_script = gr.Textbox(label="Generated Podcast εζ¬")
|
298 |
generate_button.click(fn=process_podcast, inputs=[input_text, Language, Speaker_1, Speaker_2, api_key], outputs=[podcast_script, audio_output])
|
299 |
|
300 |
if __name__ == "__main__":
|
requirements.txt
CHANGED
@@ -1,8 +1,4 @@
|
|
1 |
-
openai
|
2 |
gradio
|
3 |
-
gradio-client
|
4 |
openai
|
5 |
pydub
|
6 |
-
|
7 |
-
pypdf
|
8 |
-
edge_tts
|
|
|
|
|
1 |
gradio
|
|
|
2 |
openai
|
3 |
pydub
|
4 |
+
edge-tts
|
|
|
|