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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -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.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
@@ -224,7 +224,7 @@ with gr.Blocks(title="Orpheus Text-to-Speech") as demo:
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")
228
 
229
  with gr.Column(scale=2):
230
  duration = gr.Slider(minimum=1, maximum=60, value=5, step=1, label="Duration (minutes)")
 
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
 
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):
230
  duration = gr.Slider(minimum=1, maximum=60, value=5, step=1, label="Duration (minutes)")