Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -736,6 +736,14 @@ def process_image(focal_image, same_brand_files, competitive_brand_files):
|
|
| 736 |
emo_neutral
|
| 737 |
]
|
| 738 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 739 |
|
| 740 |
"""#5. Gradio Interface"""
|
| 741 |
|
|
|
|
| 736 |
emo_neutral
|
| 737 |
]
|
| 738 |
|
| 739 |
+
import cv2, requests
|
| 740 |
+
image = cv2.imdecode(np.frombuffer(requests.get("https://github.com/JaidedAI/EasyOCR/raw/master/examples/english.png").content, np.uint8), cv2.IMREAD_COLOR)
|
| 741 |
+
|
| 742 |
+
image = Image.fromarray(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
|
| 743 |
+
image = image.convert('RGB')
|
| 744 |
+
image
|
| 745 |
+
|
| 746 |
+
process_image(image, None, None)
|
| 747 |
|
| 748 |
"""#5. Gradio Interface"""
|
| 749 |
|