n0v33n
commited on
Commit
·
502c9b2
1
Parent(s):
33a8649
updata app.py
Browse files
app.py
CHANGED
@@ -62,94 +62,116 @@ def guide_user(prompt):
|
|
62 |
|
63 |
# === Custom CSS for Gradio UI ===
|
64 |
css = """
|
|
|
65 |
body {
|
66 |
-
background-color: #
|
67 |
-
font-family: '
|
|
|
68 |
margin: 0;
|
69 |
padding: 0;
|
70 |
-
}
|
71 |
|
|
|
72 |
.gradio-container {
|
73 |
-
max-width:
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
}
|
80 |
|
|
|
81 |
.gr-block {
|
82 |
width: 100%;
|
|
|
83 |
}
|
84 |
|
|
|
85 |
h1 {
|
86 |
-
color: #
|
87 |
text-align: center;
|
88 |
-
font-size: 2.
|
89 |
-
margin-bottom:
|
|
|
90 |
}
|
91 |
|
92 |
h2, p.subtitle, .subheading, .description {
|
93 |
-
color: #
|
94 |
text-align: center;
|
95 |
-
font-size: 1.
|
96 |
-
margin-bottom:
|
97 |
-
|
98 |
}
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
border
|
103 |
-
|
|
|
104 |
width: 100%;
|
105 |
box-sizing: border-box;
|
106 |
font-size: 1rem;
|
107 |
-
background-color: #
|
108 |
transition: border-color 0.3s ease;
|
109 |
}
|
110 |
|
111 |
input[type="text"]:focus, textarea:focus {
|
|
|
112 |
outline: none;
|
113 |
-
border-color: #1967d2;
|
114 |
-
box-shadow: 0 0 0 2px rgba(25, 103, 210, 0.1);
|
115 |
}
|
116 |
|
|
|
117 |
button {
|
118 |
-
background-color: #
|
119 |
color: #ffffff;
|
120 |
-
border-radius:
|
121 |
-
padding:
|
122 |
font-size: 1rem;
|
123 |
font-weight: 500;
|
124 |
border: none;
|
125 |
cursor: pointer;
|
126 |
-
transition: background-color 0.3s ease;
|
127 |
}
|
128 |
|
129 |
button:hover {
|
130 |
-
background-color: #
|
|
|
131 |
}
|
132 |
|
|
|
|
|
|
|
|
|
|
|
133 |
.output-text {
|
134 |
-
background-color: #
|
135 |
-
border: 1px solid #
|
136 |
-
border-radius:
|
137 |
-
padding:
|
138 |
-
font-size:
|
139 |
line-height: 1.5;
|
140 |
-
color: #
|
141 |
-
white-space: pre-wrap;
|
142 |
}
|
143 |
|
|
|
144 |
@media (max-width: 768px) {
|
145 |
.gradio-container {
|
146 |
-
padding:
|
147 |
}
|
|
|
148 |
h1 {
|
149 |
-
font-size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
151 |
}
|
152 |
-
|
153 |
"""
|
154 |
|
155 |
|
|
|
62 |
|
63 |
# === Custom CSS for Gradio UI ===
|
64 |
css = """
|
65 |
+
/* General body styles */
|
66 |
body {
|
67 |
+
background-color: #e8f0f2; /* Light blue-green background */
|
68 |
+
font-family: 'Roboto', 'Segoe UI', sans-serif';
|
69 |
+
color: #2e2e2e; /* Dark gray for text */
|
70 |
margin: 0;
|
71 |
padding: 0;
|
|
|
72 |
|
73 |
+
/* Gradio container */
|
74 |
.gradio-container {
|
75 |
+
max-width: 100% !important;
|
76 |
+
padding: 2.5rem 5%; /* Responsive padding */
|
77 |
+
background-color: #ffffff; /* White content area */
|
78 |
+
border-radius: 8px;
|
79 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0.1);
|
80 |
+
margin: 1rem auto;
|
81 |
}
|
82 |
|
83 |
+
/* Ensure blocks take full width */
|
84 |
.gr-block {
|
85 |
width: 100%;
|
86 |
+
box-sizing: border-box;
|
87 |
}
|
88 |
|
89 |
+
/* Headings */
|
90 |
h1 {
|
91 |
+
color: #1a4e78; /* Deep blue for main title */
|
92 |
text-align: center;
|
93 |
+
font-size: 2.5rem;
|
94 |
+
margin-bottom: 1.5rem;
|
95 |
+
font-weight: 700;
|
96 |
}
|
97 |
|
98 |
h2, p.subtitle, .subheading, .description {
|
99 |
+
color: #3d7e6a; /* Muted green for subtitles */
|
100 |
text-align: center;
|
101 |
+
font-size: 1.25rem;
|
102 |
+
margin-bottom: 1rem;
|
103 |
+
font-weight: normal;
|
104 |
}
|
105 |
|
106 |
+
/* Input fields and textareas */
|
107 |
+
input[type="text"], textarea {
|
108 |
+
border: 2px solid #4ca8a8a; /* Light teal border */
|
109 |
+
border-radius: 6px;
|
110 |
+
padding: 0.75rem;
|
111 |
width: 100%;
|
112 |
box-sizing: border-box;
|
113 |
font-size: 1rem;
|
114 |
+
background-color: #f9fdfffc; /* Very light blue background */
|
115 |
transition: border-color 0.3s ease;
|
116 |
}
|
117 |
|
118 |
input[type="text"]:focus, textarea:focus {
|
119 |
+
border-color: #1a4e78; /* Deep blue on focus */
|
120 |
outline: none;
|
|
|
|
|
121 |
}
|
122 |
|
123 |
+
/* Buttons */
|
124 |
button {
|
125 |
+
background-color: #1a4e78; /* Deep blue button */
|
126 |
color: #ffffff;
|
127 |
+
border-radius: 6px;
|
128 |
+
padding: 0.75rem 1.5rem;
|
129 |
font-size: 1rem;
|
130 |
font-weight: 500;
|
131 |
border: none;
|
132 |
cursor: pointer;
|
133 |
+
transition: background-color 0.3s ease, transform 0.2s ease;
|
134 |
}
|
135 |
|
136 |
button:hover {
|
137 |
+
background-color: #143c5f; /* Darker blue on hover */
|
138 |
+
transform: translateY(-2px);
|
139 |
}
|
140 |
|
141 |
+
button:active {
|
142 |
+
transform: translateY(0);
|
143 |
+
}
|
144 |
+
|
145 |
+
/* Output text area */
|
146 |
.output-text {
|
147 |
+
background-color: #e9f4f4; /* Light teal background */
|
148 |
+
border: 1px solid #4ca8a8a; /* Teal border */
|
149 |
+
border-radius: 6px;
|
150 |
+
padding: 1rem;
|
151 |
+
font-size: 1rem;
|
152 |
line-height: 1.5;
|
153 |
+
color: #2e2e2e;
|
|
|
154 |
}
|
155 |
|
156 |
+
/* Responsive adjustments */
|
157 |
@media (max-width: 768px) {
|
158 |
.gradio-container {
|
159 |
+
padding: 1.5rem 3%;
|
160 |
}
|
161 |
+
|
162 |
h1 {
|
163 |
+
font-size: 2rem;
|
164 |
+
}
|
165 |
+
|
166 |
+
h2, p.subtitle, .subheading, .description {
|
167 |
+
font-size: 1rem;
|
168 |
+
}
|
169 |
+
|
170 |
+
button {
|
171 |
+
padding: 0.6rem 1.2rem;
|
172 |
+
font-size: 0.9rem;
|
173 |
}
|
174 |
}
|
|
|
175 |
"""
|
176 |
|
177 |
|