Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -83,36 +83,36 @@ def transcribe_file(audio_upload, language):
|
|
83 |
|
84 |
css_content = """
|
85 |
.popup-overlay {
|
86 |
-
position: fixed
|
87 |
-
top: 0
|
88 |
-
left: 0
|
89 |
-
width: 100vw
|
90 |
-
height: 100vh
|
91 |
-
background: rgba(0, 0, 0, 0.
|
92 |
-
z-index:
|
93 |
-
display: flex
|
94 |
-
justify-content: center
|
95 |
-
align-items: center
|
96 |
}
|
97 |
|
98 |
.popup-box {
|
99 |
-
background-color: white
|
100 |
-
padding: 20px
|
101 |
-
border-radius: 10px
|
102 |
-
box-shadow: 0 0 20px rgba(0,0,0,0.3)
|
103 |
-
width:
|
104 |
-
text-align: center
|
105 |
-
z-index:
|
106 |
}
|
107 |
|
108 |
.popup-button {
|
109 |
-
background-color: #5b65a7
|
110 |
-
color: white
|
111 |
-
padding: 10px 20px
|
112 |
-
border-radius: 8px
|
113 |
-
margin-top: 10px
|
114 |
-
border: none
|
115 |
-
cursor: pointer
|
116 |
}
|
117 |
/*
|
118 |
.popup-button:hover {
|
@@ -207,17 +207,18 @@ button.selected::after{
|
|
207 |
with gr.Blocks(css=css_content) as demo:
|
208 |
show_btn = gr.Button("Show Popup")
|
209 |
|
|
|
210 |
popup = gr.Column(visible=False, elem_classes=["popup-overlay"])
|
211 |
with popup:
|
212 |
with gr.Column(elem_classes=["popup-box"]):
|
213 |
gr.Markdown("""
|
214 |
-
|
215 |
-
|
216 |
""")
|
217 |
-
|
218 |
|
219 |
show_btn.click(show_popup, outputs=popup)
|
220 |
-
|
221 |
|
222 |
demo.launch()
|
223 |
|
|
|
83 |
|
84 |
css_content = """
|
85 |
.popup-overlay {
|
86 |
+
position: fixed;
|
87 |
+
top: 0;
|
88 |
+
left: 0;
|
89 |
+
width: 100vw;
|
90 |
+
height: 100vh;
|
91 |
+
background: rgba(0, 0, 0, 0.6);
|
92 |
+
z-index: 10000;
|
93 |
+
display: flex;
|
94 |
+
justify-content: center;
|
95 |
+
align-items: center;
|
96 |
}
|
97 |
|
98 |
.popup-box {
|
99 |
+
background-color: white;
|
100 |
+
padding: 20px;
|
101 |
+
border-radius: 10px;
|
102 |
+
box-shadow: 0 0 20px rgba(0,0,0,0.3);
|
103 |
+
width: 360px;
|
104 |
+
text-align: center;
|
105 |
+
z-index: 10001;
|
106 |
}
|
107 |
|
108 |
.popup-button {
|
109 |
+
background-color: #5b65a7;
|
110 |
+
color: white;
|
111 |
+
padding: 10px 20px;
|
112 |
+
border-radius: 8px;
|
113 |
+
margin-top: 10px;
|
114 |
+
border: none;
|
115 |
+
cursor: pointer;
|
116 |
}
|
117 |
/*
|
118 |
.popup-button:hover {
|
|
|
207 |
with gr.Blocks(css=css_content) as demo:
|
208 |
show_btn = gr.Button("Show Popup")
|
209 |
|
210 |
+
# The overlay layer
|
211 |
popup = gr.Column(visible=False, elem_classes=["popup-overlay"])
|
212 |
with popup:
|
213 |
with gr.Column(elem_classes=["popup-box"]):
|
214 |
gr.Markdown("""
|
215 |
+
### ℹ️ Notice
|
216 |
+
The recordings are not saved and are automatically removed.
|
217 |
""")
|
218 |
+
ok_btn = gr.Button("OK", elem_classes=["popup-button"])
|
219 |
|
220 |
show_btn.click(show_popup, outputs=popup)
|
221 |
+
ok_btn.click(hide_popup, outputs=popup)
|
222 |
|
223 |
demo.launch()
|
224 |
|