Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,16 @@ def inference(
|
|
168 |
TITLE = "<h1 style='font-size: 2.5em; text-align: center;'>Identify objects in construction design</h1>"
|
169 |
DESCRIPTION = """<p style='font-size: 1.5em; line-height: 1.6em; text-align: left;'>Welcome to the object
|
170 |
identification application. This tool allows you to upload an image, and it will identify and annotate objects within
|
171 |
-
the image. Additionally, you can perform OCR analysis on the detected objects.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
CSS = """
|
173 |
#output {
|
174 |
height: 500px;
|
@@ -178,6 +187,11 @@ CSS = """
|
|
178 |
h1 {
|
179 |
text-align: center;
|
180 |
}
|
|
|
|
|
|
|
|
|
|
|
181 |
"""
|
182 |
EXAMPLES = [
|
183 |
['examples/train1.png', 0.6, 0.25],
|
@@ -190,7 +204,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=CSS) as demo:
|
|
190 |
gr.HTML(TITLE)
|
191 |
gr.HTML(DESCRIPTION)
|
192 |
with gr.Tab(label="Identify objects"):
|
193 |
-
with gr.Row():
|
194 |
input_img = gr.Image(type="filepath", label="Upload Image")
|
195 |
output_img = gr.Image(type="filepath", label="Output Image")
|
196 |
with gr.Row():
|
|
|
168 |
TITLE = "<h1 style='font-size: 2.5em; text-align: center;'>Identify objects in construction design</h1>"
|
169 |
DESCRIPTION = """<p style='font-size: 1.5em; line-height: 1.6em; text-align: left;'>Welcome to the object
|
170 |
identification application. This tool allows you to upload an image, and it will identify and annotate objects within
|
171 |
+
the image. Additionally, you can perform OCR analysis on the detected objects.</p>
|
172 |
+
<h2 style='font-size: 1.8em; line-height: 1.6em; text-align: left;'>Steps to use the app:</h2>
|
173 |
+
<ol style='font-size: 1.2em; line-height: 1.6em; text-align: left;'>
|
174 |
+
<li>Upload an image by clicking on the "Upload Image" button.</li>
|
175 |
+
<li>Adjust the "Confidence Threshold" and "IOU Threshold" sliders to set the detection sensitivity.</li>
|
176 |
+
<li>Click on the "Predict" button to run the object detection model.</li>
|
177 |
+
<li>The detected objects will be displayed in the "Detected Mark Object" gallery.</li>
|
178 |
+
<li>To analyze the detected objects, click on the "Analysis" button. The results will be shown in the "Results" table.</li>
|
179 |
+
</ol>
|
180 |
+
"""
|
181 |
CSS = """
|
182 |
#output {
|
183 |
height: 500px;
|
|
|
187 |
h1 {
|
188 |
text-align: center;
|
189 |
}
|
190 |
+
p, h2, ol {
|
191 |
+
text-align: left;
|
192 |
+
margin: 0 auto;
|
193 |
+
max-width: 800px;
|
194 |
+
}
|
195 |
"""
|
196 |
EXAMPLES = [
|
197 |
['examples/train1.png', 0.6, 0.25],
|
|
|
204 |
gr.HTML(TITLE)
|
205 |
gr.HTML(DESCRIPTION)
|
206 |
with gr.Tab(label="Identify objects"):
|
207 |
+
with gr.Row(equal_height=False):
|
208 |
input_img = gr.Image(type="filepath", label="Upload Image")
|
209 |
output_img = gr.Image(type="filepath", label="Output Image")
|
210 |
with gr.Row():
|