Reputation: 353
When I try to run my streamlit app I get these errors in Anaconda Prompt:
I simplified the code to be more readable, but basically it process an input with a Keras model, then I save this model with pickle in order to make predictions afterwards with Streamlit API
import streamlit as st
import cv2 as cv
import matplotlib.pyplot as plt
import pandas as pd
import os
import numpy as np
import keras
from keras.models import Sequential
import joblib
import pickle
def some_function():
pass #some function to preprocess data and train a model with Keras
def main():
ruta_to_model=r'path'
model = pickle.load(open(os.path.join(ruta_to_model,'model_pose.pkl'),'rb'))
st.set_page_config(page_title='Pose Framework',layout='wide',initial_sidebar_state='expanded')
files=[]
for file in os.listdir(r'path'):
if file.endswith('.jpg'):
files.append(file)
option=st.multiselect('Input:', files)
if option and st.button('Predict'):
inputs=some_function()
model.predict(inputs)
Upvotes: 0
Views: 405
Reputation: 31760
The error contains
ImportError: cannot import name 'DataFrame' from 'pandas' (unknown location)
Have you installed pandas
inside your conda environment?
conda install pandas
Upvotes: 0