Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,10 +38,12 @@ def generate_podcast_script(api_key, prompt, uploaded_file, duration, num_hosts)
|
|
38 |
try:
|
39 |
genai.configure(api_key=api_key)
|
40 |
model = genai.GenerativeModel('gemini-2.5-pro-preview-03-25')
|
41 |
-
|
42 |
combined_content = prompt or ""
|
43 |
-
|
44 |
-
|
|
|
|
|
45 |
combined_content += "\n" + file_content if combined_content else file_content
|
46 |
|
47 |
num_hosts = int(num_hosts) # Convert to integer
|
|
|
38 |
try:
|
39 |
genai.configure(api_key=api_key)
|
40 |
model = genai.GenerativeModel('gemini-2.5-pro-preview-03-25')
|
41 |
+
|
42 |
combined_content = prompt or ""
|
43 |
+
|
44 |
+
if uploaded_file is not None:
|
45 |
+
# Handle the uploaded file content
|
46 |
+
file_content = uploaded_file.name # This gets the content of the NamedString
|
47 |
combined_content += "\n" + file_content if combined_content else file_content
|
48 |
|
49 |
num_hosts = int(num_hosts) # Convert to integer
|