Spaces:
Runtime error
Runtime error
AkshatJain1402
commited on
Commit
•
af5a863
1
Parent(s):
7b920eb
testing gradio interface
Browse files- __pycache__/sort.cpython-311.pyc +0 -0
- app.py +12 -9
__pycache__/sort.cpython-311.pyc
ADDED
Binary file (21.8 kB). View file
|
|
app.py
CHANGED
@@ -6,6 +6,8 @@ import math
|
|
6 |
from sort import *
|
7 |
import datetime
|
8 |
import geocoder
|
|
|
|
|
9 |
|
10 |
#i want to take co ordinates in lat long of this device
|
11 |
# def get_coordinates():
|
@@ -70,9 +72,9 @@ def fareCalculations():
|
|
70 |
index+=1
|
71 |
|
72 |
print(totalFare)
|
73 |
-
cap = cv2.VideoCapture('
|
74 |
|
75 |
-
model = YOLO("
|
76 |
stationFrom='Meerut'
|
77 |
stationFromCoordinates={"lat":"12.12.54.4","long":"44.36.09"} # Meerut
|
78 |
stationToCoordinates={'lat':'54.45.56',"long":'45.45.45'}
|
@@ -211,8 +213,14 @@ while True:
|
|
211 |
cv2.putText(img, str(entry_count), (110, 245), cv2.FONT_HERSHEY_PLAIN, 5, (50, 50, 230), 7)
|
212 |
print('count is ', entry_count)
|
213 |
print(dict)
|
214 |
-
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
print(entry_count)
|
217 |
|
218 |
# if currentCoordinates==stationToCoordinates:
|
@@ -224,8 +232,3 @@ while True:
|
|
224 |
print('reached destination')
|
225 |
fareCalculations()
|
226 |
break
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
|
|
6 |
from sort import *
|
7 |
import datetime
|
8 |
import geocoder
|
9 |
+
import gradio as gr
|
10 |
+
|
11 |
|
12 |
#i want to take co ordinates in lat long of this device
|
13 |
# def get_coordinates():
|
|
|
72 |
index+=1
|
73 |
|
74 |
print(totalFare)
|
75 |
+
cap = cv2.VideoCapture('TrialFootage.mp4')
|
76 |
|
77 |
+
model = YOLO("./Yolo-Weights/yolov8n.pt")
|
78 |
stationFrom='Meerut'
|
79 |
stationFromCoordinates={"lat":"12.12.54.4","long":"44.36.09"} # Meerut
|
80 |
stationToCoordinates={'lat':'54.45.56',"long":'45.45.45'}
|
|
|
213 |
cv2.putText(img, str(entry_count), (110, 245), cv2.FONT_HERSHEY_PLAIN, 5, (50, 50, 230), 7)
|
214 |
print('count is ', entry_count)
|
215 |
print(dict)
|
216 |
+
|
217 |
+
image=gr.inputs.Image(frame)
|
218 |
+
# Create the Gradio interface
|
219 |
+
interface = gr.Interface(
|
220 |
+
|
221 |
+
outputs=image,
|
222 |
+
)
|
223 |
+
# cv2.waitKey(1)
|
224 |
print(entry_count)
|
225 |
|
226 |
# if currentCoordinates==stationToCoordinates:
|
|
|
232 |
print('reached destination')
|
233 |
fareCalculations()
|
234 |
break
|
|
|
|
|
|
|
|
|
|