Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,9 @@ def ocr_and_extract(image, text_query):
|
|
28 |
temp_image_path = "temp_image.jpg"
|
29 |
image.save(temp_image_path)
|
30 |
|
|
|
|
|
|
|
31 |
# Index the image with Byaldi
|
32 |
rag_model.index(
|
33 |
input_path=temp_image_path,
|
|
|
28 |
temp_image_path = "temp_image.jpg"
|
29 |
image.save(temp_image_path)
|
30 |
|
31 |
+
# Clear the index before adding a new image to avoid conflicts
|
32 |
+
rag_model.delete_index("image_index")
|
33 |
+
|
34 |
# Index the image with Byaldi
|
35 |
rag_model.index(
|
36 |
input_path=temp_image_path,
|