imorcillo commited on
Commit
958aecd
·
verified ·
1 Parent(s): a9d86d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -28
app.py CHANGED
@@ -83,36 +83,36 @@ def transcribe_file(audio_upload, language):
83
 
84
  css_content = """
85
  .popup-overlay {
86
- position: fixed !important;
87
- top: 0 !important;
88
- left: 0 !important;
89
- width: 100vw !important;
90
- height: 100vh !important;
91
- background: rgba(0, 0, 0, 0.5) !important;
92
- z-index: 9999 !important;
93
- display: flex !important;
94
- justify-content: center !important;
95
- align-items: center !important;
96
  }
97
 
98
  .popup-box {
99
- background-color: white !important;
100
- padding: 20px !important;
101
- border-radius: 10px !important;
102
- box-shadow: 0 0 20px rgba(0,0,0,0.3) !important;
103
- width: 340px !important;
104
- text-align: center !important;
105
- z-index: 10000 !important;
106
  }
107
 
108
  .popup-button {
109
- background-color: #5b65a7 !important;
110
- color: white !important;
111
- padding: 10px 20px !important;
112
- border-radius: 8px !important;
113
- margin-top: 10px !important;
114
- border: none !important;
115
- cursor: pointer !important;
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
- ### ℹ️ Notice
215
- The recordings are not saved and are automatically removed.
216
  """)
217
- close_btn = gr.Button("OK", elem_classes=["popup-button"])
218
 
219
  show_btn.click(show_popup, outputs=popup)
220
- close_btn.click(hide_popup, outputs=popup)
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