Spaces:
Build error
Build error
no message
Browse files
app.py
CHANGED
|
@@ -22,6 +22,15 @@ COLS = st.columns([0.60, 0.40])
|
|
| 22 |
SCROLLABLE_TEXT = COLS[1].container(height=500)
|
| 23 |
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
def classify_full_dataset(shosen_dataset_name, chosen_model_name):
|
| 26 |
image_count = 0
|
| 27 |
|
|
@@ -36,17 +45,26 @@ def classify_full_dataset(shosen_dataset_name, chosen_model_name):
|
|
| 36 |
image_object = dataset['pasta'][i-1]["image"]
|
| 37 |
SCROLLABLE_TEXT.image(image_object, caption="Uploaded Image", width=300)
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
image_object_texte_data = dataset['pasta'][i-1]
|
| 40 |
SCROLLABLE_TEXT.write(f"image_object_texte_data: {image_object_texte_data}")
|
| 41 |
|
| 42 |
|
| 43 |
-
|
| 44 |
SCROLLABLE_TEXT.write(f"teste1 (image_object._getexif()): {teste1}")
|
| 45 |
|
| 46 |
-
|
| 47 |
teste2 = image_object._getexif().items()
|
| 48 |
SCROLLABLE_TEXT.write(f"teste2 (image_object._getexif().items()): {teste2}")
|
| 49 |
|
|
|
|
|
|
|
| 50 |
#extract_metadata = { ExifTags.TAGS[k]: v for k, v in image_object._getexif().items() if k in ExifTags.TAGS }
|
| 51 |
#SCROLLABLE_TEXT.write(f"extract_metadata: {extract_metadata}")
|
| 52 |
|
|
|
|
| 22 |
SCROLLABLE_TEXT = COLS[1].container(height=500)
|
| 23 |
|
| 24 |
|
| 25 |
+
def extract_file_name(image_object):
|
| 26 |
+
file_name = image_object.filename
|
| 27 |
+
return file_name
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def extract_index(file_name):
|
| 31 |
+
return "flag: todo"
|
| 32 |
+
|
| 33 |
+
|
| 34 |
def classify_full_dataset(shosen_dataset_name, chosen_model_name):
|
| 35 |
image_count = 0
|
| 36 |
|
|
|
|
| 45 |
image_object = dataset['pasta'][i-1]["image"]
|
| 46 |
SCROLLABLE_TEXT.image(image_object, caption="Uploaded Image", width=300)
|
| 47 |
|
| 48 |
+
|
| 49 |
+
file_name = extract_file_name(image_object)
|
| 50 |
+
SCROLLABLE_TEXT.write(f"file_name: {file_name}")
|
| 51 |
+
image_index = extract_index(file_name)
|
| 52 |
+
SCROLLABLE_TEXT.write(f"image_index: {image_index}")
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
image_object_texte_data = dataset['pasta'][i-1]
|
| 57 |
SCROLLABLE_TEXT.write(f"image_object_texte_data: {image_object_texte_data}")
|
| 58 |
|
| 59 |
|
| 60 |
+
|
| 61 |
SCROLLABLE_TEXT.write(f"teste1 (image_object._getexif()): {teste1}")
|
| 62 |
|
|
|
|
| 63 |
teste2 = image_object._getexif().items()
|
| 64 |
SCROLLABLE_TEXT.write(f"teste2 (image_object._getexif().items()): {teste2}")
|
| 65 |
|
| 66 |
+
|
| 67 |
+
|
| 68 |
#extract_metadata = { ExifTags.TAGS[k]: v for k, v in image_object._getexif().items() if k in ExifTags.TAGS }
|
| 69 |
#SCROLLABLE_TEXT.write(f"extract_metadata: {extract_metadata}")
|
| 70 |
|