shukdevdatta123 commited on
Commit
ea7518b
·
verified ·
1 Parent(s): 9b5c32b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -6
app.py CHANGED
@@ -121,8 +121,9 @@ custom_css = """
121
  font-size: 1.1rem;
122
  cursor: pointer;
123
  transition: all 0.3s ease;
124
- margin-left: 80px !important;
125
- margin-top: -180px;
 
126
  }
127
  #submit-btn:hover {
128
  background-color: #0099cc; /* Slightly darker blue */
@@ -130,7 +131,6 @@ custom_css = """
130
  #submit-btn:active {
131
  transform: scale(0.95);
132
  }
133
-
134
  /* Clear History Button: Light Red */
135
  #clear-history {
136
  background-color: #f04e4e; /* Slightly Darker red */
@@ -141,7 +141,7 @@ custom_css = """
141
  font-size: 1.1rem;
142
  cursor: pointer;
143
  transition: all 0.3s ease;
144
- margin-top: -180px;
145
  }
146
  #clear-history:hover {
147
  background-color: #f5a4a4; /* Light red */
@@ -149,7 +149,6 @@ custom_css = """
149
  #clear-history:active {
150
  transform: scale(0.95);
151
  }
152
-
153
  /* Chat history styles */
154
  .gradio-chatbot .message {
155
  margin-bottom: 10px;
@@ -171,7 +170,6 @@ custom_css = """
171
  margin-left: auto;
172
  animation: slideInAssistant 0.5s ease-out;
173
  }
174
-
175
  /* Animation keyframes */
176
  @keyframes fadeIn {
177
  0% { opacity: 0; }
@@ -185,6 +183,25 @@ custom_css = """
185
  0% { transform: translateX(100%); }
186
  100% { transform: translateX(0); }
187
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  """
189
 
190
  # Gradio interface setup
 
121
  font-size: 1.1rem;
122
  cursor: pointer;
123
  transition: all 0.3s ease;
124
+ margin-left: auto;
125
+ margin-right: auto;
126
+ display: block;
127
  }
128
  #submit-btn:hover {
129
  background-color: #0099cc; /* Slightly darker blue */
 
131
  #submit-btn:active {
132
  transform: scale(0.95);
133
  }
 
134
  /* Clear History Button: Light Red */
135
  #clear-history {
136
  background-color: #f04e4e; /* Slightly Darker red */
 
141
  font-size: 1.1rem;
142
  cursor: pointer;
143
  transition: all 0.3s ease;
144
+ margin-top: 10px;
145
  }
146
  #clear-history:hover {
147
  background-color: #f5a4a4; /* Light red */
 
149
  #clear-history:active {
150
  transform: scale(0.95);
151
  }
 
152
  /* Chat history styles */
153
  .gradio-chatbot .message {
154
  margin-bottom: 10px;
 
170
  margin-left: auto;
171
  animation: slideInAssistant 0.5s ease-out;
172
  }
 
173
  /* Animation keyframes */
174
  @keyframes fadeIn {
175
  0% { opacity: 0; }
 
183
  0% { transform: translateX(100%); }
184
  100% { transform: translateX(0); }
185
  }
186
+ /* Mobile responsiveness */
187
+ @media (max-width: 768px) {
188
+ .gradio-header h1 {
189
+ font-size: 1.8rem;
190
+ }
191
+ .gradio-header h3 {
192
+ font-size: 1rem;
193
+ }
194
+ .gradio-chatbot {
195
+ max-height: 400px;
196
+ }
197
+ .gradio-textbox, .gradio-dropdown, .gradio-image {
198
+ width: 100%;
199
+ }
200
+ #submit-btn, #clear-history {
201
+ width: 100%;
202
+ margin-left: 0;
203
+ }
204
+ }
205
  """
206
 
207
  # Gradio interface setup