Spaces:
Runtime error
Runtime error
yiyixuxu
commited on
Commit
•
fd03f3a
1
Parent(s):
bdf85d2
app.py
CHANGED
@@ -109,8 +109,8 @@ def captioned_strip(images, caption=None, times=None, rows=1):
|
|
109 |
img.paste(img_, (i // rows * w, increased_h + (i % rows) * h))
|
110 |
if caption is not None:
|
111 |
draw = ImageDraw.Draw(img)
|
112 |
-
font = ImageFont.
|
113 |
-
font_small = ImageFont.truetype("arial.pil", 12)
|
114 |
#font = ImageFont.truetype(
|
115 |
# "/usr/share/fonts/truetype/liberation2/LiberationMono-Bold.ttf", 16
|
116 |
#)
|
@@ -121,7 +121,7 @@ def captioned_strip(images, caption=None, times=None, rows=1):
|
|
121 |
(i % rows) * w + 40 , #column poistion
|
122 |
i // rows * h + 33) # row position
|
123 |
, ts,
|
124 |
-
(255, 255, 255), font=
|
125 |
return img
|
126 |
|
127 |
def run_inference(url, sampling_interval, search_query):
|
|
|
109 |
img.paste(img_, (i // rows * w, increased_h + (i % rows) * h))
|
110 |
if caption is not None:
|
111 |
draw = ImageDraw.Draw(img)
|
112 |
+
font = ImageFont.load_default()
|
113 |
+
#font_small = ImageFont.truetype("arial.pil", 12)
|
114 |
#font = ImageFont.truetype(
|
115 |
# "/usr/share/fonts/truetype/liberation2/LiberationMono-Bold.ttf", 16
|
116 |
#)
|
|
|
121 |
(i % rows) * w + 40 , #column poistion
|
122 |
i // rows * h + 33) # row position
|
123 |
, ts,
|
124 |
+
(255, 255, 255), font=font)
|
125 |
return img
|
126 |
|
127 |
def run_inference(url, sampling_interval, search_query):
|