Spaces:
Running
Running
Update pages/27_Inception_model.py
Browse files
pages/27_Inception_model.py
CHANGED
@@ -7,6 +7,7 @@ from torch.utils.data import DataLoader
|
|
7 |
import streamlit as st
|
8 |
import matplotlib.pyplot as plt
|
9 |
import numpy as np
|
|
|
10 |
|
11 |
# Define the Inception Module
|
12 |
class InceptionModule(nn.Module):
|
@@ -77,7 +78,7 @@ st.title("InceptionNet Image Classifier")
|
|
77 |
|
78 |
uploaded_file = st.file_uploader("Choose an image...", type="jpg")
|
79 |
if uploaded_file is not None:
|
80 |
-
image =
|
81 |
st.image(image, caption='Uploaded Image', use_column_width=True)
|
82 |
|
83 |
image = transform(image).unsqueeze(0).to(device)
|
|
|
7 |
import streamlit as st
|
8 |
import matplotlib.pyplot as plt
|
9 |
import numpy as np
|
10 |
+
from PIL import Image
|
11 |
|
12 |
# Define the Inception Module
|
13 |
class InceptionModule(nn.Module):
|
|
|
78 |
|
79 |
uploaded_file = st.file_uploader("Choose an image...", type="jpg")
|
80 |
if uploaded_file is not None:
|
81 |
+
image = Image.open(uploaded_file)
|
82 |
st.image(image, caption='Uploaded Image', use_column_width=True)
|
83 |
|
84 |
image = transform(image).unsqueeze(0).to(device)
|