Update app.py
Browse files
app.py
CHANGED
|
@@ -1074,6 +1074,23 @@ strong {
|
|
| 1074 |
}
|
| 1075 |
"""
|
| 1076 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1077 |
def main():
|
| 1078 |
# Create Gradio interface
|
| 1079 |
recommender = QuestionRecommender()
|
|
@@ -1096,7 +1113,7 @@ def main():
|
|
| 1096 |
background_fill_secondary="#f9fafc"
|
| 1097 |
)
|
| 1098 |
|
| 1099 |
-
with gr.Blocks(title="Let's Talk - Question Recommender", theme=theme, css=custom_css, mode="light") as iface:
|
| 1100 |
gr.Markdown("""
|
| 1101 |
# 🤝 Let's Talk - Question Recommender
|
| 1102 |
Find questions that two users might be interested in discussing together based on their common interests.
|
|
|
|
| 1074 |
}
|
| 1075 |
"""
|
| 1076 |
|
| 1077 |
+
force_light_mode_js = """
|
| 1078 |
+
function() {
|
| 1079 |
+
// Remove dark mode class from html element
|
| 1080 |
+
document.documentElement.classList.remove('dark');
|
| 1081 |
+
|
| 1082 |
+
// Set data-theme attribute to light
|
| 1083 |
+
document.documentElement.setAttribute('data-theme', 'light');
|
| 1084 |
+
|
| 1085 |
+
// Override any system preference
|
| 1086 |
+
document.documentElement.style.colorScheme = 'light';
|
| 1087 |
+
|
| 1088 |
+
// Also try to set it on the body
|
| 1089 |
+
document.body.classList.remove('dark');
|
| 1090 |
+
document.body.setAttribute('data-theme', 'light');
|
| 1091 |
+
}
|
| 1092 |
+
"""
|
| 1093 |
+
|
| 1094 |
def main():
|
| 1095 |
# Create Gradio interface
|
| 1096 |
recommender = QuestionRecommender()
|
|
|
|
| 1113 |
background_fill_secondary="#f9fafc"
|
| 1114 |
)
|
| 1115 |
|
| 1116 |
+
with gr.Blocks(title="Let's Talk - Question Recommender", theme=theme, css=custom_css, mode="light", js=force_light_mode_js) as iface:
|
| 1117 |
gr.Markdown("""
|
| 1118 |
# 🤝 Let's Talk - Question Recommender
|
| 1119 |
Find questions that two users might be interested in discussing together based on their common interests.
|