Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,15 +51,7 @@ def update_video_display(video_path):
|
|
| 51 |
return None, ""
|
| 52 |
|
| 53 |
# Create the Gradio interface
|
| 54 |
-
with gr.Blocks(
|
| 55 |
-
title="🎥 Simple Video Recorder",
|
| 56 |
-
theme=gr.themes.Soft(),
|
| 57 |
-
css="""
|
| 58 |
-
.gradio-container {max-width: 900px !important;}
|
| 59 |
-
.video-container {border-radius: 10px; overflow: hidden;}
|
| 60 |
-
.status-box {background: #f0f7ff; padding: 15px; border-radius: 8px; border-left: 4px solid #4a90e2;}
|
| 61 |
-
"""
|
| 62 |
-
) as demo:
|
| 63 |
|
| 64 |
gr.Markdown("""
|
| 65 |
# 🎥 Simple Video Recorder
|
|
@@ -75,9 +67,7 @@ with gr.Blocks(
|
|
| 75 |
sources=["webcam", "upload"],
|
| 76 |
interactive=True,
|
| 77 |
include_audio=True,
|
| 78 |
-
|
| 79 |
-
height=300,
|
| 80 |
-
elem_classes="video-container"
|
| 81 |
)
|
| 82 |
|
| 83 |
filename_input = gr.Textbox(
|
|
@@ -97,16 +87,13 @@ with gr.Blocks(
|
|
| 97 |
label="Status",
|
| 98 |
value="👋 Ready to record or upload a video!",
|
| 99 |
interactive=False,
|
| 100 |
-
lines=3
|
| 101 |
-
elem_classes="status-box"
|
| 102 |
)
|
| 103 |
|
| 104 |
video_display = gr.Video(
|
| 105 |
label="Preview",
|
| 106 |
interactive=False,
|
| 107 |
-
|
| 108 |
-
height=300,
|
| 109 |
-
elem_classes="video-container"
|
| 110 |
)
|
| 111 |
|
| 112 |
download_file = gr.File(
|
|
@@ -152,4 +139,11 @@ with gr.Blocks(
|
|
| 152 |
|
| 153 |
# Launch configuration
|
| 154 |
if __name__ == "__main__":
|
| 155 |
-
demo.launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
return None, ""
|
| 52 |
|
| 53 |
# Create the Gradio interface
|
| 54 |
+
with gr.Blocks(title="🎥 Simple Video Recorder") as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
gr.Markdown("""
|
| 57 |
# 🎥 Simple Video Recorder
|
|
|
|
| 67 |
sources=["webcam", "upload"],
|
| 68 |
interactive=True,
|
| 69 |
include_audio=True,
|
| 70 |
+
height=300
|
|
|
|
|
|
|
| 71 |
)
|
| 72 |
|
| 73 |
filename_input = gr.Textbox(
|
|
|
|
| 87 |
label="Status",
|
| 88 |
value="👋 Ready to record or upload a video!",
|
| 89 |
interactive=False,
|
| 90 |
+
lines=3
|
|
|
|
| 91 |
)
|
| 92 |
|
| 93 |
video_display = gr.Video(
|
| 94 |
label="Preview",
|
| 95 |
interactive=False,
|
| 96 |
+
height=300
|
|
|
|
|
|
|
| 97 |
)
|
| 98 |
|
| 99 |
download_file = gr.File(
|
|
|
|
| 139 |
|
| 140 |
# Launch configuration
|
| 141 |
if __name__ == "__main__":
|
| 142 |
+
demo.launch(
|
| 143 |
+
theme="soft",
|
| 144 |
+
css="""
|
| 145 |
+
.gradio-container {max-width: 900px !important;}
|
| 146 |
+
.video-container {border-radius: 10px; overflow: hidden;}
|
| 147 |
+
.status-box {background: #f0f7ff; padding: 15px; border-radius: 8px; border-left: 4px solid #4a90e2;}
|
| 148 |
+
"""
|
| 149 |
+
)
|