Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -216,15 +216,15 @@ def blur_im(img,bounds,target_lang,trans_lang):
|
|
| 216 |
elif drv_rat < 1:
|
| 217 |
rat = 0.05
|
| 218 |
print(drv_rat)
|
| 219 |
-
font_size=int(int(w)*
|
| 220 |
font_size_o=int(int(w)*0.1)
|
| 221 |
|
| 222 |
font = ImageFont.truetype("./fonts/unifont-15.0.01.ttf", int(font_size))
|
| 223 |
font_o = ImageFont.truetype("./fonts/unifont-15.0.01.ttf", int(font_size_o))
|
| 224 |
|
| 225 |
|
| 226 |
-
draw.text(((x-int(
|
| 227 |
-
draw.text(((x-int(
|
| 228 |
|
| 229 |
#draw.text((x, y),text, font = font_o, fill=(0,0,0))
|
| 230 |
else:
|
|
|
|
| 216 |
elif drv_rat < 1:
|
| 217 |
rat = 0.05
|
| 218 |
print(drv_rat)
|
| 219 |
+
font_size=int(int(w)*(rat))
|
| 220 |
font_size_o=int(int(w)*0.1)
|
| 221 |
|
| 222 |
font = ImageFont.truetype("./fonts/unifont-15.0.01.ttf", int(font_size))
|
| 223 |
font_o = ImageFont.truetype("./fonts/unifont-15.0.01.ttf", int(font_size_o))
|
| 224 |
|
| 225 |
|
| 226 |
+
draw.text(((x-int(bw-tw))/2,y), text, font=font, fill="red")
|
| 227 |
+
draw.text(((x-int(bw-tw))/2,y), text, font=font_o, fill=(0,0,0))
|
| 228 |
|
| 229 |
#draw.text((x, y),text, font = font_o, fill=(0,0,0))
|
| 230 |
else:
|