Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -807,7 +807,7 @@ Example: 'Received {total_slides} slides, {total_slides} scripts, and HTML files
|
|
807 |
audio_files.append(audio_file)
|
808 |
audio_urls[i] = get_gradio_file_url(audio_file)
|
809 |
progress = 90 + ((i + 1) / len(scripts)) * 10
|
810 |
-
label = f"Generating
|
811 |
file_paths.append(audio_file)
|
812 |
yield (
|
813 |
html_with_progress(label, progress),
|
@@ -1240,29 +1240,16 @@ with gr.Blocks(
|
|
1240 |
css="""
|
1241 |
h1 {text-align: center}
|
1242 |
h2 {text-align: center}
|
1243 |
-
textarea {background-color: rgb(8 94 128) !important;border: none !important;}
|
1244 |
#lecture-container {font-family: 'Times New Roman', Times, serif;}
|
1245 |
#slide-content {font-size: 48px; line-height: 1.2;}
|
1246 |
-
#form-group {box-shadow: 0 0 2rem rgba(0, 0, 0, .14) !important; border-radius: 30px;
|
1247 |
#download {box-shadow: 0 0 2rem rgba(0, 0, 0, .14) !important; border-radius: 30px;}
|
1248 |
-
#slide-display {box-shadow: 0 0 2rem rgba(0, 0, 0, .14) !important; border-radius: 30px; background-color:
|
1249 |
-
|
1250 |
-
#component-5 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1251 |
-
#component-6 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1252 |
-
#component-7 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1253 |
-
#component-8 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1254 |
-
#component-9 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1255 |
-
#component-10 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1256 |
-
#component-11 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1257 |
-
#component-12 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1258 |
-
#component-13 {background: linear-gradient(109deg, #1c88b4, #056c93);box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;border: none !important;}
|
1259 |
-
gradio-container.gradio-container-5-28-0 .contain #slide-display {border-radius: 30px;background: linear-gradient(109deg, #198bb9, #085775);}
|
1260 |
-
.form {background: linear-gradient(109deg, #1c88b4, #056c93) !important; box-shadow: 0 0 2rem rgb(120 211 255 / 14%) !important;}
|
1261 |
-
button {transition: background-color 0.3s;}
|
1262 |
-
button:hover {background-color: linear-gradient(109deg, #147197, #085d7e) !important;}
|
1263 |
-
.gradio-container { background: linear-gradient(109deg, #186a8b, #075878); box-shadow: rgba(255, 255, 255, 0.14) 0px 0px 2rem; padding-top: 30px;}
|
1264 |
.gradio-container.gradio-container-5-28-0 .contain h1 {color: white !important;}
|
1265 |
.gradio-container.gradio-container-5-28-0 .contain h2 {color: white !important;}
|
|
|
|
|
1266 |
""",
|
1267 |
js=js_code,
|
1268 |
head='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">'
|
@@ -1299,9 +1286,9 @@ with gr.Blocks(
|
|
1299 |
generate_btn = gr.Button("Generate Lecture")
|
1300 |
with gr.Column(scale=2):
|
1301 |
default_slide_html = """
|
1302 |
-
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; min-height: 700px; padding: 20px; text-align: center; border: 1px solid #
|
1303 |
-
<h2 style="font-style: italic; color: #
|
1304 |
-
<p style="margin-top: 10px; font-size: 16px;color: #
|
1305 |
</div>
|
1306 |
"""
|
1307 |
slide_display = gr.HTML(label="Lecture Slides", value=default_slide_html, elem_id="slide-display")
|
|
|
807 |
audio_files.append(audio_file)
|
808 |
audio_urls[i] = get_gradio_file_url(audio_file)
|
809 |
progress = 90 + ((i + 1) / len(scripts)) * 10
|
810 |
+
label = f"Generating speech for slide {i + 1}/{len(scripts)}..."
|
811 |
file_paths.append(audio_file)
|
812 |
yield (
|
813 |
html_with_progress(label, progress),
|
|
|
1240 |
css="""
|
1241 |
h1 {text-align: center}
|
1242 |
h2 {text-align: center}
|
|
|
1243 |
#lecture-container {font-family: 'Times New Roman', Times, serif;}
|
1244 |
#slide-content {font-size: 48px; line-height: 1.2;}
|
1245 |
+
#form-group {box-shadow: 0 0 2rem rgba(0, 0, 0, .14) !important; border-radius: 30px; font-weight: 900; color: #000; background-color: white;}
|
1246 |
#download {box-shadow: 0 0 2rem rgba(0, 0, 0, .14) !important; border-radius: 30px;}
|
1247 |
+
#slide-display {box-shadow: 0 0 2rem rgba(0, 0, 0, .14) !important; border-radius: 30px; background-color: white;}
|
1248 |
+
.gradio-container { background: linear-gradient(135deg, #2a2a2a, #6a6a6a); box-shadow: 0 0 2rem rgba(255, 255, 255, 0.14);padding-top: 30px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1249 |
.gradio-container.gradio-container-5-28-0 .contain h1 {color: white !important;}
|
1250 |
.gradio-container.gradio-container-5-28-0 .contain h2 {color: white !important;}
|
1251 |
+
button {transition: background-color 0.3s;}
|
1252 |
+
button:hover {background-color: #e0e0e0;}
|
1253 |
""",
|
1254 |
js=js_code,
|
1255 |
head='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">'
|
|
|
1286 |
generate_btn = gr.Button("Generate Lecture")
|
1287 |
with gr.Column(scale=2):
|
1288 |
default_slide_html = """
|
1289 |
+
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; min-height: 700px; padding: 20px; text-align: center; border: 1px solid #ddd; border-radius: 30px; box-shadow: 0 0 2rem rgba(0, 0, 0, .14) !important;">
|
1290 |
+
<h2 style="font-style: italic; color: #000;">Waiting for lecture content...</h2>
|
1291 |
+
<p style="margin-top: 10px; font-size: 16px;color: #000">Please Generate lecture content via the form on the left first before lecture begins</p>
|
1292 |
</div>
|
1293 |
"""
|
1294 |
slide_display = gr.HTML(label="Lecture Slides", value=default_slide_html, elem_id="slide-display")
|