bluenevus commited on
Commit
35d26f3
·
verified ·
1 Parent(s): 07e9348

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -41,7 +41,7 @@ def generate_podcast_script(api_key, prompt, uploaded_file, duration, num_hosts)
41
 
42
  combined_content = prompt or ""
43
  if uploaded_file:
44
- file_content = uploaded_file.name
45
  combined_content += "\n" + file_content if combined_content else file_content
46
 
47
  num_hosts = int(num_hosts) # Convert to integer
@@ -223,7 +223,15 @@ with gr.Blocks(title="Orpheus Text-to-Speech") as demo:
223
  with gr.Row():
224
  with gr.Column(scale=1):
225
  gemini_api_key = gr.Textbox(label="Gemini API Key", type="password")
226
- prompt = gr.Textbox(label="Prompt", lines=8, placeholder="Enter your text here...")
 
 
 
 
 
 
 
 
227
  uploaded_file = gr.File(label="Upload File", type=["txt", "docx", "pdf"])
228
 
229
  with gr.Column(scale=2):
 
41
 
42
  combined_content = prompt or ""
43
  if uploaded_file:
44
+ file_content = uploaded_file.read().decode('utf-8')
45
  combined_content += "\n" + file_content if combined_content else file_content
46
 
47
  num_hosts = int(num_hosts) # Convert to integer
 
223
  with gr.Row():
224
  with gr.Column(scale=1):
225
  gemini_api_key = gr.Textbox(label="Gemini API Key", type="password")
226
+ prompt = gr.Textbox(
227
+ label="Prompt",
228
+ placeholder="Enter your text here...",
229
+ lines=5,
230
+ max_lines=30,
231
+ show_label=True,
232
+ interactive=True,
233
+ container=True
234
+ )
235
  uploaded_file = gr.File(label="Upload File", type=["txt", "docx", "pdf"])
236
 
237
  with gr.Column(scale=2):