dejanseo commited on
Commit
ae8c060
·
verified ·
1 Parent(s): 418c8c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -6
app.py CHANGED
@@ -3,21 +3,44 @@ import torch
3
  import torch.nn.functional as F
4
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
5
 
6
- # Force light mode with white background and black text
7
  st.markdown("""
8
  <style>
9
- /* Hide Streamlit menu and footer */
10
  #MainMenu {visibility: hidden;}
11
  footer {visibility: hidden;}
12
  header {visibility: hidden;}
13
 
14
- /* Force white background */
15
  body, .stApp {
16
  background-color: #ffffff !important;
17
  color: #000000 !important;
18
  }
19
 
20
- /* Center logo in the top right */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  .block-container {
22
  padding-top: 1rem;
23
  }
@@ -38,9 +61,9 @@ model, tokenizer = load_model_and_tokenizer()
38
  # Page layout with clickable logo
39
  st.markdown("""
40
  <div style="display: flex; justify-content: space-between; align-items: center;">
41
- <h3>Класификация на намерения за търсене</h3>
42
  <a href="https://dejan.ai" target="_blank">
43
- <img src="https://huggingface.co/spaces/dejanseo/bulgarian-search-query-intent-classifier/resolve/main/dejan-300x103.png" width="150">
44
  </a>
45
  </div>
46
  """, unsafe_allow_html=True)
 
3
  import torch.nn.functional as F
4
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
5
 
6
+ # Force light theme globally
7
  st.markdown("""
8
  <style>
9
+ /* Hide Streamlit's menu and footer */
10
  #MainMenu {visibility: hidden;}
11
  footer {visibility: hidden;}
12
  header {visibility: hidden;}
13
 
14
+ /* Force white background for the whole app */
15
  body, .stApp {
16
  background-color: #ffffff !important;
17
  color: #000000 !important;
18
  }
19
 
20
+ /* Light mode for input fields */
21
+ textarea, .stTextInput, .stTextArea, .stFileUploader {
22
+ background-color: #ffffff !important;
23
+ color: #000000 !important;
24
+ border: 1px solid #ccc !important;
25
+ border-radius: 5px !important;
26
+ }
27
+
28
+ /* Light mode for buttons */
29
+ .stButton>button {
30
+ background-color: #007BFF !important;
31
+ color: #ffffff !important;
32
+ border-radius: 5px !important;
33
+ }
34
+
35
+ /* Light mode for file uploader */
36
+ .stFileUploader {
37
+ background-color: #ffffff !important;
38
+ border: 1px solid #ccc !important;
39
+ padding: 10px;
40
+ border-radius: 5px !important;
41
+ }
42
+
43
+ /* Center and size the logo */
44
  .block-container {
45
  padding-top: 1rem;
46
  }
 
61
  # Page layout with clickable logo
62
  st.markdown("""
63
  <div style="display: flex; justify-content: space-between; align-items: center;">
64
+ <h1>Класификация на намерения за търсене</h1>
65
  <a href="https://dejan.ai" target="_blank">
66
+ <img src="https://huggingface.co/spaces/dejanseo/bulgarian-search-query-intent-classifier/resolve/main/dejan-300x103.png" width="300">
67
  </a>
68
  </div>
69
  """, unsafe_allow_html=True)