Rahatara commited on
Commit
792e5c0
·
verified ·
1 Parent(s): 58e52d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -17
app.py CHANGED
@@ -92,7 +92,8 @@ h1 { text-align: center; font-size: 24px; margin-bottom: 10px; }
92
  <h1>LitPie 📖🍕</h1>
93
  """
94
 
95
- with gr.Blocks(theme=gr.themes.Glass(primary_hue = "violet", secondary_hue = "emerald", neutral_hue = "stone")) as demo:
 
96
  with gr.Tabs():
97
  with gr.TabItem("💬Chat"):
98
  gr.HTML(TITLE_Chat)
@@ -120,7 +121,7 @@ with gr.Blocks(theme=gr.themes.Glass(primary_hue = "violet", secondary_hue = "em
120
  with gr.TabItem("🎙️Podcast"):
121
  gr.HTML(TITLE)
122
  podcast_button = gr.Button("🎧 Generate Podcast")
123
- podcast_script_output = gr.Textbox(label="Podcast TranScript", placeholder="Podcast script will appear here.", lines=5)
124
  podcast_audio_output = gr.Audio(label="Podcast Audio")
125
 
126
  # Generate podcast script and audio
@@ -129,25 +130,27 @@ with gr.Blocks(theme=gr.themes.Glass(primary_hue = "violet", secondary_hue = "em
129
  inputs=chatbot, # Pass the chat history
130
  outputs=[podcast_script_output, podcast_audio_output]
131
  )
132
- with gr.TabItem("🎙️🙏Podcast"):
133
- gr.HTML(TITLE)
134
- podcast_topic_input = gr.Textbox(label="Custom Podcast Topic", placeholder="Enter your custom topic here.")
135
- chatbot_input = chatbot # Assuming `chatbot` is defined elsewhere in your application
136
- podcast_button = gr.Button("🎧 Generate Podcast")
137
- podcast_script_output = gr.Textbox(label="Podcast Transcript", placeholder="Podcast script will appear here.", lines=5)
138
- podcast_audio_output = gr.Audio(label="Podcast Audio")
139
-
140
- # Generate podcast script and audio
141
- podcast_button.click(
142
- fn=generate_and_play_podcast, # This should be defined in your actual application
143
- inputs=[chatbot_input, podcast_topic_input], # Include both chatbot input and custom topic
144
- outputs=[podcast_script_output, podcast_audio_output]
145
- )
146
- # Tab for Lit Pie 🍕
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  with gr.TabItem("Others"):
149
  gr.Markdown("### This tab is reserved for future functionalities.")
150
 
151
  demo.launch()
152
 
153
 
 
 
92
  <h1>LitPie 📖🍕</h1>
93
  """
94
 
95
+
96
+ with gr.Blocks(theme=gr.themes.Glass(primary_hue="violet", secondary_hue="emerald", neutral_hue="stone")) as demo:
97
  with gr.Tabs():
98
  with gr.TabItem("💬Chat"):
99
  gr.HTML(TITLE_Chat)
 
121
  with gr.TabItem("🎙️Podcast"):
122
  gr.HTML(TITLE)
123
  podcast_button = gr.Button("🎧 Generate Podcast")
124
+ podcast_script_output = gr.Textbox(label="Podcast Transcript", placeholder="Podcast script will appear here.", lines=5)
125
  podcast_audio_output = gr.Audio(label="Podcast Audio")
126
 
127
  # Generate podcast script and audio
 
130
  inputs=chatbot, # Pass the chat history
131
  outputs=[podcast_script_output, podcast_audio_output]
132
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
+ with gr.TabItem("🎙️🙏Podcast"):
135
+ gr.HTML(TITLE)
136
+ podcast_topic_input = gr.Textbox(label="Custom Podcast Topic", placeholder="Enter your custom topic here.")
137
+ chatbot_input = chatbot # Assuming `chatbot` is defined elsewhere in your application
138
+ podcast_button = gr.Button("🎧 Generate Podcast")
139
+ podcast_script_output = gr.Textbox(label="Podcast Transcript", placeholder="Podcast script will appear here.", lines=5)
140
+ podcast_audio_output = gr.Audio(label="Podcast Audio")
141
+
142
+ # Generate podcast script and audio
143
+ podcast_button.click(
144
+ fn=generate_and_play_podcast, # This should be defined in your actual application
145
+ inputs=[chatbot_input, podcast_topic_input], # Include both chatbot input and custom topic
146
+ outputs=[podcast_script_output, podcast_audio_output]
147
+ )
148
+
149
+ # Tab for Lit Pie 🍕
150
  with gr.TabItem("Others"):
151
  gr.Markdown("### This tab is reserved for future functionalities.")
152
 
153
  demo.launch()
154
 
155
 
156
+