capradeepgujaran commited on
Commit
796cbb5
β€’
1 Parent(s): 16d08c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -204,14 +204,14 @@ custom_css = """
204
  overflow: hidden;
205
  text-overflow: ellipsis;
206
  }
207
- .image-container { border: 2px dashed #3498db; border-radius: 10px; padding: 1rem; text-align: center; }
208
- .analyze-button { background-color: #2ecc71 !important; color: white !important; }
209
  .clear-button { background-color: #e74c3c !important; color: white !important; width: 100px !important; }
210
- .chatbot { border: 1px solid #bdc3c7; border-radius: 10px; padding: 1rem; height: 400px; overflow-y: auto; }
211
- .chat-input { border: 1px solid #bdc3c7; border-radius: 5px; padding: 0.5rem; }
212
  .groq-badge { position: fixed; bottom: 10px; right: 10px; background-color: #f39c12; color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold; }
213
- .chat-container { display: flex; flex-direction: column; }
214
- .input-row { display: flex; align-items: center; margin-top: 10px; }
215
  .input-row > div:first-child { flex-grow: 1; margin-right: 10px; }
216
  """
217
 
@@ -229,11 +229,14 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as iface:
229
  )
230
 
231
  with gr.Row():
232
- with gr.Column(scale=1):
 
233
  image_input = gr.File(label="Upload Construction Site Images", file_count="multiple", type="filepath", elem_classes="image-container")
234
  video_input = gr.Video(label="Upload Construction Site Video", elem_classes="image-container")
235
  analyze_button = gr.Button("πŸ” Analyze Safety Hazards", elem_classes="analyze-button")
236
- with gr.Column(scale=2):
 
 
237
  with gr.Group(elem_classes="chat-container"):
238
  chatbot = gr.Chatbot(label="Safety Analysis Results and Expert Chat", elem_classes="chatbot")
239
  with gr.Row(elem_classes="input-row"):
 
204
  overflow: hidden;
205
  text-overflow: ellipsis;
206
  }
207
+ .image-container { border: 2px dashed #3498db; border-radius: 10px; padding: 1rem; text-align: center; margin-bottom: 1rem; }
208
+ .analyze-button { background-color: #2ecc71 !important; color: white !important; margin-top: 10px; width: 100%; }
209
  .clear-button { background-color: #e74c3c !important; color: white !important; width: 100px !important; }
210
+ .chatbot { border: 1px solid #bdc3c7; border-radius: 10px; padding: 1rem; height: 500px; overflow-y: auto; }
211
+ .chat-input { border: 1px solid #bdc3c7; border-radius: 5px; padding: 0.5rem; width: 100%; }
212
  .groq-badge { position: fixed; bottom: 10px; right: 10px; background-color: #f39c12; color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold; }
213
+ .chat-container { display: flex; flex-direction: column; height: 100%; }
214
+ .input-row { display: flex; align-items: center; margin-top: 10px; justify-content: space-between; }
215
  .input-row > div:first-child { flex-grow: 1; margin-right: 10px; }
216
  """
217
 
 
229
  )
230
 
231
  with gr.Row():
232
+ # Input section
233
+ with gr.Column(scale=1, min_width=300): # Adjust width of input column
234
  image_input = gr.File(label="Upload Construction Site Images", file_count="multiple", type="filepath", elem_classes="image-container")
235
  video_input = gr.Video(label="Upload Construction Site Video", elem_classes="image-container")
236
  analyze_button = gr.Button("πŸ” Analyze Safety Hazards", elem_classes="analyze-button")
237
+
238
+ # Chat output section
239
+ with gr.Column(scale=2): # Larger scale for the chat output section
240
  with gr.Group(elem_classes="chat-container"):
241
  chatbot = gr.Chatbot(label="Safety Analysis Results and Expert Chat", elem_classes="chatbot")
242
  with gr.Row(elem_classes="input-row"):