VyLala commited on
Commit
40f440d
·
verified ·
1 Parent(s): 408aa77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -39
app.py CHANGED
@@ -19,6 +19,43 @@ with open("offer.html", "r", encoding="utf-8") as f:
19
  with open("mtdna_tool_explainer_updated.html", "r", encoding="utf-8") as f:
20
  flow_chart = f.read()
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  with gr.Blocks() as interface:
24
  # with gr.Tab("CURIOUS ABOUT THIS PRODUCT?"):
@@ -1205,44 +1242,6 @@ with gr.Blocks() as interface:
1205
 
1206
  </style>
1207
  """)
1208
-
1209
- # This would go in a separate CSS file or a <style> block in your Gradio app
1210
- css = """
1211
- #nps-buttons-container .gr-radio-group {
1212
- display: flex;
1213
- flex-direction: row;
1214
- justify-content: center;
1215
- gap: 8px; /* Adjust spacing between buttons */
1216
- }
1217
- #nps-buttons-container .gr-radio-input {
1218
- display: none; /* Hide the default radio circle */
1219
- }
1220
- #nps-buttons-container .gr-radio-label {
1221
- display: flex;
1222
- justify-content: center;
1223
- align-items: center;
1224
- width: 40px; /* Adjust button size */
1225
- height: 40px;
1226
- border-radius: 8px; /* Adjust border radius for rounded corners */
1227
- background-color: #38a169; /* Example green color */
1228
- color: white;
1229
- font-weight: bold;
1230
- cursor: pointer;
1231
- transition: background-color 0.2s ease;
1232
- }
1233
- #nps-buttons-container .gr-radio-label:hover {
1234
- background-color: #2f855a; /* Darker green on hover */
1235
- }
1236
- #nps-buttons-container input[type="radio"]:checked + .gr-radio-label {
1237
- background-color: #1a4f35; /* Even darker green for the selected state */
1238
- border: 2px solid white; /* Highlight the selected button */
1239
- }
1240
- #nps-left-label, #nps-right-label {
1241
- width: 50%;
1242
- font-size: 0.9em;
1243
- color: #666;
1244
- }
1245
- """
1246
 
1247
  # # Custom CSS styles
1248
  # gr.HTML("""
@@ -1287,4 +1286,4 @@ with gr.Blocks() as interface:
1287
 
1288
 
1289
 
1290
- interface.launch(share=True,debug=True,css=css)
 
19
  with open("mtdna_tool_explainer_updated.html", "r", encoding="utf-8") as f:
20
  flow_chart = f.read()
21
 
22
+ # This would go in a separate CSS file or a <style> block in your Gradio app
23
+ css = """
24
+ #nps-buttons-container .gr-radio-group {
25
+ display: flex;
26
+ flex-direction: row;
27
+ justify-content: center;
28
+ gap: 8px; /* Adjust spacing between buttons */
29
+ }
30
+ #nps-buttons-container .gr-radio-input {
31
+ display: none; /* Hide the default radio circle */
32
+ }
33
+ #nps-buttons-container .gr-radio-label {
34
+ display: flex;
35
+ justify-content: center;
36
+ align-items: center;
37
+ width: 40px; /* Adjust button size */
38
+ height: 40px;
39
+ border-radius: 8px; /* Adjust border radius for rounded corners */
40
+ background-color: #38a169; /* Example green color */
41
+ color: white;
42
+ font-weight: bold;
43
+ cursor: pointer;
44
+ transition: background-color 0.2s ease;
45
+ }
46
+ #nps-buttons-container .gr-radio-label:hover {
47
+ background-color: #2f855a; /* Darker green on hover */
48
+ }
49
+ #nps-buttons-container input[type="radio"]:checked + .gr-radio-label {
50
+ background-color: #1a4f35; /* Even darker green for the selected state */
51
+ border: 2px solid white; /* Highlight the selected button */
52
+ }
53
+ #nps-left-label, #nps-right-label {
54
+ width: 50%;
55
+ font-size: 0.9em;
56
+ color: #666;
57
+ }
58
+ """
59
 
60
  with gr.Blocks() as interface:
61
  # with gr.Tab("CURIOUS ABOUT THIS PRODUCT?"):
 
1242
 
1243
  </style>
1244
  """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1245
 
1246
  # # Custom CSS styles
1247
  # gr.HTML("""
 
1286
 
1287
 
1288
 
1289
+ interface.launch(share=True,debug=True)