DreamStream-1 commited on
Commit
d4e1309
·
verified ·
1 Parent(s): b2ea81a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -0
app.py CHANGED
@@ -26,11 +26,14 @@ custom_css = """
26
  max-width: 1200px !important;
27
  margin: 0 auto !important;
28
  font-family: 'Inter', sans-serif;
 
 
29
  }
30
  .container {
31
  max-width: 1200px;
32
  margin: 0 auto;
33
  padding: 20px;
 
34
  }
35
  .chat-container {
36
  border: 1px solid #e0e0e0;
@@ -39,6 +42,8 @@ custom_css = """
39
  background: white;
40
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
41
  margin-bottom: 20px;
 
 
42
  }
43
  .file-upload {
44
  border: 2px dashed #e0e0e0;
@@ -60,6 +65,7 @@ custom_css = """
60
  padding: 24px;
61
  text-align: center;
62
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
 
63
  }
64
  .record-button {
65
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
@@ -123,12 +129,51 @@ custom_css = """
123
  border-radius: 12px !important;
124
  border: 2px solid #e0e0e0 !important;
125
  padding: 16px !important;
 
 
126
  }
127
  @keyframes pulse {
128
  0% { transform: scale(1); box-shadow: 0 4px 6px rgba(244, 67, 54, 0.2); }
129
  50% { transform: scale(1.05); box-shadow: 0 6px 8px rgba(244, 67, 54, 0.3); }
130
  100% { transform: scale(1); box-shadow: 0 4px 6px rgba(244, 67, 54, 0.2); }
131
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  """
133
 
134
  # Custom audio recorder component with improved styling
 
26
  max-width: 1200px !important;
27
  margin: 0 auto !important;
28
  font-family: 'Inter', sans-serif;
29
+ height: 100vh !important;
30
+ overflow-y: auto !important;
31
  }
32
  .container {
33
  max-width: 1200px;
34
  margin: 0 auto;
35
  padding: 20px;
36
+ height: 100%;
37
  }
38
  .chat-container {
39
  border: 1px solid #e0e0e0;
 
42
  background: white;
43
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
44
  margin-bottom: 20px;
45
+ height: calc(100vh - 200px);
46
+ overflow-y: auto;
47
  }
48
  .file-upload {
49
  border: 2px dashed #e0e0e0;
 
65
  padding: 24px;
66
  text-align: center;
67
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
68
+ margin-bottom: 20px;
69
  }
70
  .record-button {
71
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
 
129
  border-radius: 12px !important;
130
  border: 2px solid #e0e0e0 !important;
131
  padding: 16px !important;
132
+ height: calc(100vh - 300px) !important;
133
+ overflow-y: auto !important;
134
  }
135
  @keyframes pulse {
136
  0% { transform: scale(1); box-shadow: 0 4px 6px rgba(244, 67, 54, 0.2); }
137
  50% { transform: scale(1.05); box-shadow: 0 6px 8px rgba(244, 67, 54, 0.3); }
138
  100% { transform: scale(1); box-shadow: 0 4px 6px rgba(244, 67, 54, 0.2); }
139
  }
140
+
141
+ /* Fix for Gradio's internal scrolling */
142
+ #component-0 {
143
+ height: 100% !important;
144
+ overflow-y: auto !important;
145
+ }
146
+ #component-1 {
147
+ height: 100% !important;
148
+ overflow-y: auto !important;
149
+ }
150
+ #component-2 {
151
+ height: 100% !important;
152
+ overflow-y: auto !important;
153
+ }
154
+
155
+ /* Ensure the chat interface takes full height */
156
+ #chat-interface {
157
+ height: 100% !important;
158
+ display: flex !important;
159
+ flex-direction: column !important;
160
+ }
161
+
162
+ /* Make sure the chat messages container scrolls */
163
+ #chat-messages {
164
+ flex: 1 !important;
165
+ overflow-y: auto !important;
166
+ padding: 20px !important;
167
+ }
168
+
169
+ /* Ensure the input area stays at the bottom */
170
+ #chat-input {
171
+ position: sticky !important;
172
+ bottom: 0 !important;
173
+ background: white !important;
174
+ padding: 20px !important;
175
+ border-top: 1px solid #e0e0e0 !important;
176
+ }
177
  """
178
 
179
  # Custom audio recorder component with improved styling