jableable commited on
Commit
a477d28
·
verified ·
1 Parent(s): b4ac94c

Delete old/app.py

Browse files
Files changed (1) hide show
  1. old/app.py +0 -43
old/app.py DELETED
@@ -1,43 +0,0 @@
1
- import streamlit as st
2
- from transformers import pipeline
3
- #from datasets import load_dataset, Image
4
- from huggingface_hub import from_pretrained_keras
5
- import keras
6
- import numpy as np
7
- from PIL import Image
8
-
9
- loaded_model = keras.saving.load_model("best_model.keras")
10
-
11
- uploaded_img = st.file_uploader("Upload your file here...",type=['png', 'jpeg', 'jpg'])
12
-
13
- if uploaded_img is not None:
14
- st.image(uploaded_img)
15
- img = Image.open(uploaded_img).resize((160, 160))
16
- img = np.array(img)
17
- result = loaded_model.predict(img[None,:,:])
18
- st.write(f"Your prediction is: {result}")
19
-
20
-
21
- #model = from_pretrained_keras("jableable/road_model")
22
-
23
- #pipe = pipeline('sentiment-analysis')
24
- #text = st.text_area('enter some text!')
25
-
26
- #if text:
27
- #out = pipe(text)
28
- #st.json(out)
29
-
30
- #loaded_model = keras.saving.load_model("jableable/road_model")
31
-
32
- #model = from_pretrained_keras("keras-io/ocr-for-captcha")
33
- #model.summary()
34
- #prediction = model.predict(image)
35
- #prediction = tf.squeeze(tf.round(prediction))
36
- #print(f'The image is a {classes[(np.argmax(prediction))]}!')
37
-
38
-
39
- #dataset = load_dataset("beans", split="train")
40
-
41
- #loaded_img = dataset[0]["image"]
42
- #print(loaded_img)
43
-