Shatha2030 commited on
Commit
1eabc98
·
verified ·
1 Parent(s): 15b8cda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -48
app.py CHANGED
@@ -104,58 +104,11 @@ def detect_objects(media):
104
  except Exception as e:
105
  return None, None, None, f"❌ Error: {str(e)}", gr.update(visible=False), gr.update(visible=False)
106
 
107
- # Custom CSS for styling
108
- custom_css = """
109
- #app-container {
110
- max-width: 1200px;
111
- margin: 0 auto;
112
- padding: 20px;
113
- }
114
- #logo-img {
115
- max-height: 100px;
116
- margin-bottom: 20px;
117
- }
118
- .upload-box {
119
- border: 2px dashed #ccc;
120
- padding: 20px;
121
- text-align: center;
122
- border-radius: 8px;
123
- background-color: #f8f9fa;
124
- margin: 20px 0;
125
- }
126
- .results-container {
127
- background-color: #ffffff;
128
- border-radius: 8px;
129
- padding: 15px;
130
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
131
- margin-top: 20px;
132
- }
133
- .detection-info {
134
- background-color: #f8f9fa;
135
- padding: 15px;
136
- border-radius: 8px;
137
- margin-top: 10px;
138
- font-family: monospace;
139
- }
140
- .center {
141
- display: flex;
142
- justify-content: center;
143
- align-items: center;
144
- margin-bottom: 1rem;
145
- }
146
- """
147
 
148
  # Create Gradio interface
149
  with gr.Blocks(css=custom_css) as demo:
150
  with gr.Column(elem_id="app-container"):
151
- # Logo and Header
152
- with gr.Column(elem_classes="center"):
153
- gr.Image("logo-h.png",
154
- show_label=False,
155
- container=False,
156
- elem_id="logo-img",
157
- height=100)
158
-
159
  gr.Markdown("# 🔍 Object Detection")
160
 
161
  # Upload Section
 
104
  except Exception as e:
105
  return None, None, None, f"❌ Error: {str(e)}", gr.update(visible=False), gr.update(visible=False)
106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  # Create Gradio interface
109
  with gr.Blocks(css=custom_css) as demo:
110
  with gr.Column(elem_id="app-container"):
111
+
 
 
 
 
 
 
 
112
  gr.Markdown("# 🔍 Object Detection")
113
 
114
  # Upload Section