chandra7799 commited on
Commit
f92cfec
·
verified ·
1 Parent(s): 9fe51c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -2
app.py CHANGED
@@ -138,8 +138,33 @@ def process_image(image, project_name):
138
  except Exception as e:
139
  return f"Error: {str(e)}", "Failure", "", "", 0
140
 
141
- # Gradio UI without any title or styling
142
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  with gr.Row():
144
  image_input = gr.Image(type="filepath", label="Upload Construction Site Photo (JPG/PNG, ≤ 20MB)")
145
  project_name_input = gr.Textbox(label="Project Name (Required)", placeholder="e.g. Project_12345")
 
138
  except Exception as e:
139
  return f"Error: {str(e)}", "Failure", "", "", 0
140
 
141
+ # Gradio UI with added styling
142
+ with gr.Blocks(css="""
143
+ .gradio-container {
144
+ background-color: #f0f4f8;
145
+ font-family: Arial;
146
+ }
147
+ .title {
148
+ color: #2c3e50;
149
+ font-size: 24px;
150
+ text-align: center;
151
+ font-weight: bold;
152
+ }
153
+ .gradio-row {
154
+ text-align: center;
155
+ }
156
+ .gradio-container .output {
157
+ text-align: center;
158
+ }
159
+ .gradio-container .input {
160
+ text-align: center;
161
+ }
162
+ .gradio-container .button {
163
+ display: block;
164
+ margin: 0 auto;
165
+ }
166
+ """) as demo:
167
+ gr.Markdown("<h1 class='title'>Construction Milestone Detector</h1>")
168
  with gr.Row():
169
  image_input = gr.Image(type="filepath", label="Upload Construction Site Photo (JPG/PNG, ≤ 20MB)")
170
  project_name_input = gr.Textbox(label="Project Name (Required)", placeholder="e.g. Project_12345")