omarhkh commited on
Commit
7f71b90
1 Parent(s): 3c7e098

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -141,16 +141,16 @@ def tott(model_name,url_input,image_input,threshold,type2):
141
  det_lab = processed_outputs["labels"][keep].tolist()
142
  xxresult=0
143
  if det_lab.count(1) > 0:
144
- else:
145
- xxresult=1
146
  if det_lab.count(4) > 0:
147
- else:
148
- if type2=="Trench Depth Measurement":
149
- xxresult=1
150
  if det_lab.count(5) > 0:
151
- else:
152
- if type2=="Trench Width Measurement":
153
- xxresult=1
154
 
155
  if xxresult==0:
156
  return "The photo is ACCEPTED"
@@ -168,11 +168,12 @@ def set_example_url(example: list) -> dict:
168
  title = """<h1 id="title">Object Detection App for POC</h1>"""
169
 
170
  description = """
171
- This application will test the model for the followings:
172
  - Select the model
173
- - Select the type of classification
174
- - Then Detect
175
- - The actual Results
 
176
  """
177
 
178
  models = ["omarhkh/detr-finetuned-omar8"]
 
141
  det_lab = processed_outputs["labels"][keep].tolist()
142
  xxresult=0
143
  if det_lab.count(1) > 0:
144
+ else:
145
+ xxresult=1
146
  if det_lab.count(4) > 0:
147
+ else:
148
+ if type2=="Trench Depth Measurement":
149
+ xxresult=1
150
  if det_lab.count(5) > 0:
151
+ else:
152
+ if type2=="Trench Width Measurement":
153
+ xxresult=1
154
 
155
  if xxresult==0:
156
  return "The photo is ACCEPTED"
 
168
  title = """<h1 id="title">Object Detection App for POC</h1>"""
169
 
170
  description = """
171
+ This application can be used as follows:
172
  - Select the model
173
+ - Select the type of classification
174
+ - Select the photo
175
+ - Press Detect
176
+ - Press Results
177
  """
178
 
179
  models = ["omarhkh/detr-finetuned-omar8"]