AliDaud commited on
Commit
263e8a5
·
verified ·
1 Parent(s): 8f96f85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -76,14 +76,13 @@ def format_script(script: str) -> str:
76
  line = line.strip()
77
  if not line:
78
  continue
 
79
  if line.startswith("Ali:"):
80
  content = line.replace("Ali:", "").strip()
81
  formatted += f"<div class='host1'>🎙️ <b>Ali:</b> {content}</div>\n"
82
  elif line.startswith("Talha:"):
83
  content = line.replace("Talha:", "").strip()
84
  formatted += f"<div class='host2'>🎧 <b>Talha:</b> {content}</div>\n"
85
- else:
86
- formatted += f"<div class='narration'>{line}</div>\n"
87
 
88
  return formatted
89
 
@@ -139,7 +138,7 @@ custom_css = """
139
 
140
  # === GRADIO INTERFACE ===
141
  with gr.Blocks(css=custom_css) as demo:
142
- gr.Markdown("## 🎙️ Educational Podcast Generator with Ali & Talha", elem_id="title")
143
  gr.Markdown("Enter an educational topic, and enjoy a friendly podcast conversation between Ali and Talha.")
144
 
145
  topic_input = gr.Textbox(label="Enter educational topic")
 
76
  line = line.strip()
77
  if not line:
78
  continue
79
+ # Only keep lines that are spoken by Ali or Talha
80
  if line.startswith("Ali:"):
81
  content = line.replace("Ali:", "").strip()
82
  formatted += f"<div class='host1'>🎙️ <b>Ali:</b> {content}</div>\n"
83
  elif line.startswith("Talha:"):
84
  content = line.replace("Talha:", "").strip()
85
  formatted += f"<div class='host2'>🎧 <b>Talha:</b> {content}</div>\n"
 
 
86
 
87
  return formatted
88
 
 
138
 
139
  # === GRADIO INTERFACE ===
140
  with gr.Blocks(css=custom_css) as demo:
141
+ gr.Markdown("## 🎙️ Educational Podcast Generator for Students", elem_id="title")
142
  gr.Markdown("Enter an educational topic, and enjoy a friendly podcast conversation between Ali and Talha.")
143
 
144
  topic_input = gr.Textbox(label="Enter educational topic")