Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def classify_symptoms(text):
|
|
44 |
except Exception as e:
|
45 |
return f"Error processing classification: {str(e)}"
|
46 |
|
47 |
-
# Enhanced CSS with
|
48 |
custom_css = """
|
49 |
.gradio-container {
|
50 |
width: 100% !important;
|
@@ -54,14 +54,13 @@ custom_css = """
|
|
54 |
min-height: 100vh !important;
|
55 |
display: flex !important;
|
56 |
flex-direction: column !important;
|
57 |
-
background-color: #
|
58 |
}
|
59 |
.main-container {
|
60 |
text-align: center;
|
61 |
padding: 2rem;
|
62 |
margin: 0;
|
63 |
-
background: #
|
64 |
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
65 |
width: 100%;
|
66 |
}
|
67 |
.content-wrapper {
|
@@ -72,77 +71,113 @@ custom_css = """
|
|
72 |
box-sizing: border-box;
|
73 |
}
|
74 |
h1 {
|
75 |
-
color: #
|
76 |
font-size: 3rem !important;
|
77 |
margin-bottom: 0.5rem !important;
|
|
|
78 |
}
|
79 |
h3 {
|
80 |
-
color: #
|
81 |
font-size: 1.4rem !important;
|
82 |
-
font-weight:
|
|
|
83 |
}
|
84 |
.input-container {
|
85 |
-
background:
|
86 |
padding: 2rem !important;
|
87 |
-
border-radius:
|
88 |
-
box-shadow: 0
|
89 |
margin: 2rem 0 !important;
|
90 |
width: 100% !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
textarea {
|
93 |
-
background:
|
94 |
-
color: #
|
95 |
-
border: 2px solid #
|
96 |
border-radius: 8px !important;
|
97 |
padding: 1rem !important;
|
98 |
font-size: 1.2rem !important;
|
99 |
min-height: 150px !important;
|
100 |
width: 100% !important;
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
.submit-btn {
|
103 |
-
background-color: #
|
104 |
color: white !important;
|
105 |
padding: 1rem 3rem !important;
|
106 |
border-radius: 8px !important;
|
107 |
font-size: 1.2rem !important;
|
108 |
margin-top: 1.5rem !important;
|
109 |
-
transition:
|
110 |
width: auto !important;
|
|
|
|
|
|
|
111 |
}
|
112 |
.submit-btn:hover {
|
113 |
-
background-color: #
|
|
|
|
|
114 |
}
|
115 |
.output-container {
|
116 |
-
background:
|
117 |
padding: 2rem !important;
|
118 |
-
border-radius:
|
119 |
-
box-shadow: 0
|
120 |
margin: 2rem 0 !important;
|
121 |
width: 100% !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
.output-container pre {
|
124 |
background: #f8f9fa !important;
|
125 |
-
color: #
|
126 |
border-radius: 8px !important;
|
127 |
padding: 1.5rem !important;
|
128 |
font-size: 1.1rem !important;
|
|
|
129 |
}
|
130 |
.examples-container {
|
131 |
-
background:
|
132 |
padding: 2rem !important;
|
133 |
-
border-radius:
|
134 |
margin: 2rem 0 !important;
|
135 |
-
box-shadow: 0
|
136 |
width: 100% !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
138 |
.footer {
|
139 |
text-align: center;
|
140 |
padding: 2rem;
|
141 |
-
background:
|
142 |
margin-top: auto;
|
143 |
width: 100%;
|
144 |
-
|
145 |
-
color: #
|
|
|
|
|
|
|
146 |
}
|
147 |
"""
|
148 |
|
|
|
44 |
except Exception as e:
|
45 |
return f"Error processing classification: {str(e)}"
|
46 |
|
47 |
+
# Enhanced CSS with improved colors and contrast
|
48 |
custom_css = """
|
49 |
.gradio-container {
|
50 |
width: 100% !important;
|
|
|
54 |
min-height: 100vh !important;
|
55 |
display: flex !important;
|
56 |
flex-direction: column !important;
|
57 |
+
background-color: #ffffff !important;
|
58 |
}
|
59 |
.main-container {
|
60 |
text-align: center;
|
61 |
padding: 2rem;
|
62 |
margin: 0;
|
63 |
+
background: #f8f9fa;
|
|
|
64 |
width: 100%;
|
65 |
}
|
66 |
.content-wrapper {
|
|
|
71 |
box-sizing: border-box;
|
72 |
}
|
73 |
h1 {
|
74 |
+
color: #4527a0 !important;
|
75 |
font-size: 3rem !important;
|
76 |
margin-bottom: 0.5rem !important;
|
77 |
+
font-weight: 700 !important;
|
78 |
}
|
79 |
h3 {
|
80 |
+
color: #5e35b1 !important;
|
81 |
font-size: 1.4rem !important;
|
82 |
+
font-weight: 500 !important;
|
83 |
+
margin-bottom: 2rem !important;
|
84 |
}
|
85 |
.input-container {
|
86 |
+
background: #ffffff !important;
|
87 |
padding: 2rem !important;
|
88 |
+
border-radius: 12px !important;
|
89 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
|
90 |
margin: 2rem 0 !important;
|
91 |
width: 100% !important;
|
92 |
+
border: 1px solid #e0e0e0 !important;
|
93 |
+
}
|
94 |
+
.input-container label {
|
95 |
+
color: #333333 !important;
|
96 |
+
font-weight: 600 !important;
|
97 |
+
font-size: 1.1rem !important;
|
98 |
+
margin-bottom: 0.5rem !important;
|
99 |
}
|
100 |
textarea {
|
101 |
+
background: #ffffff !important;
|
102 |
+
color: #333333 !important;
|
103 |
+
border: 2px solid #673ab7 !important;
|
104 |
border-radius: 8px !important;
|
105 |
padding: 1rem !important;
|
106 |
font-size: 1.2rem !important;
|
107 |
min-height: 150px !important;
|
108 |
width: 100% !important;
|
109 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
|
110 |
+
}
|
111 |
+
textarea:focus {
|
112 |
+
border-color: #4527a0 !important;
|
113 |
+
box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.1) !important;
|
114 |
}
|
115 |
.submit-btn {
|
116 |
+
background-color: #673ab7 !important;
|
117 |
color: white !important;
|
118 |
padding: 1rem 3rem !important;
|
119 |
border-radius: 8px !important;
|
120 |
font-size: 1.2rem !important;
|
121 |
margin-top: 1.5rem !important;
|
122 |
+
transition: all 0.3s ease !important;
|
123 |
width: auto !important;
|
124 |
+
font-weight: 600 !important;
|
125 |
+
border: none !important;
|
126 |
+
box-shadow: 0 2px 4px rgba(103, 58, 183, 0.2) !important;
|
127 |
}
|
128 |
.submit-btn:hover {
|
129 |
+
background-color: #5e35b1 !important;
|
130 |
+
box-shadow: 0 4px 8px rgba(103, 58, 183, 0.3) !important;
|
131 |
+
transform: translateY(-1px) !important;
|
132 |
}
|
133 |
.output-container {
|
134 |
+
background: #ffffff !important;
|
135 |
padding: 2rem !important;
|
136 |
+
border-radius: 12px !important;
|
137 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
|
138 |
margin: 2rem 0 !important;
|
139 |
width: 100% !important;
|
140 |
+
border: 1px solid #e0e0e0 !important;
|
141 |
+
}
|
142 |
+
.output-container label {
|
143 |
+
color: #333333 !important;
|
144 |
+
font-weight: 600 !important;
|
145 |
+
font-size: 1.1rem !important;
|
146 |
+
margin-bottom: 1rem !important;
|
147 |
}
|
148 |
.output-container pre {
|
149 |
background: #f8f9fa !important;
|
150 |
+
color: #333333 !important;
|
151 |
border-radius: 8px !important;
|
152 |
padding: 1.5rem !important;
|
153 |
font-size: 1.1rem !important;
|
154 |
+
border: 1px solid #e0e0e0 !important;
|
155 |
}
|
156 |
.examples-container {
|
157 |
+
background: #ffffff !important;
|
158 |
padding: 2rem !important;
|
159 |
+
border-radius: 12px !important;
|
160 |
margin: 2rem 0 !important;
|
161 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
|
162 |
width: 100% !important;
|
163 |
+
border: 1px solid #e0e0e0 !important;
|
164 |
+
}
|
165 |
+
.examples-container label {
|
166 |
+
color: #333333 !important;
|
167 |
+
font-weight: 600 !important;
|
168 |
+
font-size: 1.1rem !important;
|
169 |
}
|
170 |
.footer {
|
171 |
text-align: center;
|
172 |
padding: 2rem;
|
173 |
+
background: #f8f9fa;
|
174 |
margin-top: auto;
|
175 |
width: 100%;
|
176 |
+
border-top: 1px solid #e0e0e0;
|
177 |
+
color: #4527a0;
|
178 |
+
}
|
179 |
+
.footer strong {
|
180 |
+
color: #333333;
|
181 |
}
|
182 |
"""
|
183 |
|