Spaces:
Sleeping
Sleeping
no message
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
from PIL import Image
|
4 |
-
from datasets import load_dataset, Image,
|
5 |
from PIL import Image
|
6 |
|
7 |
MODELS = [
|
@@ -34,6 +34,8 @@ def classify_full_dataset(shosen_dataset_name, chosen_model_name):
|
|
34 |
SCROLLABLE_TEXT.write("i-1:" + str(i-1))
|
35 |
image_object = dataset['pasta'][i-1]["image"]
|
36 |
SCROLLABLE_TEXT.image(image_object, caption="Uploaded Image", width=300)
|
|
|
|
|
37 |
#classification
|
38 |
classification_result = classifier_pipeline(image_object)
|
39 |
SCROLLABLE_TEXT.write(classification_result)
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
from PIL import Image
|
4 |
+
from datasets import load_dataset, Image, image_object
|
5 |
from PIL import Image
|
6 |
|
7 |
MODELS = [
|
|
|
34 |
SCROLLABLE_TEXT.write("i-1:" + str(i-1))
|
35 |
image_object = dataset['pasta'][i-1]["image"]
|
36 |
SCROLLABLE_TEXT.image(image_object, caption="Uploaded Image", width=300)
|
37 |
+
extract_metadata = dataset['pasta'][i-1]["metadata"]
|
38 |
+
SCROLLABLE_TEXT.write(extract_metadata)
|
39 |
#classification
|
40 |
classification_result = classifier_pipeline(image_object)
|
41 |
SCROLLABLE_TEXT.write(classification_result)
|