Update app.py
Browse files
app.py
CHANGED
|
@@ -43,9 +43,9 @@ def predict(img, translation_method, font):
|
|
| 43 |
text_translated = manga_translator.translate(text,
|
| 44 |
method=translation_method)
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
return image
|
| 49 |
|
| 50 |
demo = gr.Interface(fn=predict,
|
| 51 |
inputs=["image",
|
|
|
|
| 43 |
text_translated = manga_translator.translate(text,
|
| 44 |
method=translation_method)
|
| 45 |
|
| 46 |
+
image[int(y1):int(y2), int(x1):int(x2)] = add_text(detected_image, text_translated, font, cont)
|
| 47 |
|
| 48 |
+
return Image.fromarray(image)
|
| 49 |
|
| 50 |
demo = gr.Interface(fn=predict,
|
| 51 |
inputs=["image",
|