Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,9 +2,14 @@ import streamlit as st
|
|
| 2 |
import pandas as pd
|
| 3 |
import matplotlib.pyplot as plt
|
| 4 |
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
|
|
|
|
| 7 |
|
|
|
|
|
|
|
| 8 |
extractor = AutoFeatureExtractor.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099221")
|
| 9 |
model = AutoModelForImageClassification.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099221")
|
| 10 |
st.write(model.__class__.__name__)
|
|
@@ -22,23 +27,27 @@ model = AutoModelForImageClassification.from_pretrained("rwcuffney/autotrain-pic
|
|
| 22 |
st.write(model.__class__.__name__)
|
| 23 |
st.code(type(model))
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
extractor = AutoFeatureExtractor.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099224")
|
| 28 |
model = AutoModelForImageClassification.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099224")
|
| 29 |
st.write(model.__class__.__name__)
|
| 30 |
st.code(type(model))
|
| 31 |
|
|
|
|
|
|
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
extractor = AutoFeatureExtractor.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099225")
|
| 34 |
model = AutoModelForImageClassification.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099225")
|
| 35 |
st.write(model.__class__.__name__)
|
| 36 |
st.code(type(model))
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
-
from datasets import load_dataset
|
| 40 |
-
dataset = load_dataset("rwcuffney/pick_a_card_test")
|
| 41 |
-
|
| 42 |
'''
|
| 43 |
x = st.slider('Select a value')
|
| 44 |
st.write(x, 'squared is', x * x)
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
import matplotlib.pyplot as plt
|
| 4 |
|
| 5 |
+
from datasets import load_dataset
|
| 6 |
+
dataset = load_dataset("rwcuffney/pick_a_card_test")
|
| 7 |
|
| 8 |
+
#tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
|
| 9 |
+
#tokenized_data = tokenizer(dataset["sentence"], return_tensors="np", padding=True)
|
| 10 |
|
| 11 |
+
from transformers import AutoFeatureExtractor, AutoModelForImageClassification
|
| 12 |
+
'''
|
| 13 |
extractor = AutoFeatureExtractor.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099221")
|
| 14 |
model = AutoModelForImageClassification.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099221")
|
| 15 |
st.write(model.__class__.__name__)
|
|
|
|
| 27 |
st.write(model.__class__.__name__)
|
| 28 |
st.code(type(model))
|
| 29 |
|
| 30 |
+
'''
|
| 31 |
|
| 32 |
extractor = AutoFeatureExtractor.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099224")
|
| 33 |
model = AutoModelForImageClassification.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099224")
|
| 34 |
st.write(model.__class__.__name__)
|
| 35 |
st.code(type(model))
|
| 36 |
|
| 37 |
+
from transformers import AutoImageProcessor
|
| 38 |
+
import torch
|
| 39 |
|
| 40 |
+
image_processor = AutoImageProcessor.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099224"))
|
| 41 |
+
inputs = image_processor(image, return_tensors="pt")
|
| 42 |
+
|
| 43 |
+
'''
|
| 44 |
extractor = AutoFeatureExtractor.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099225")
|
| 45 |
model = AutoModelForImageClassification.from_pretrained("rwcuffney/autotrain-pick_a_card-3726099225")
|
| 46 |
st.write(model.__class__.__name__)
|
| 47 |
st.code(type(model))
|
| 48 |
+
'''
|
| 49 |
|
| 50 |
|
|
|
|
|
|
|
|
|
|
| 51 |
'''
|
| 52 |
x = st.slider('Select a value')
|
| 53 |
st.write(x, 'squared is', x * x)
|