Giter Site home page Giter Site logo

autostreamlit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autostreamlit's Issues

Getting df_compare output empty

StreamlitAPIException: ("Could not convert 'PassengerId' with type str: tried to convert to int64", 'Conversion failed for column Value with type object')
solved this err using "C:\Users\your_user\anaconda3\envs\your_env_name\Lib\site-packages\streamlit\config.py"
In the config.py locate dataFrameSerialization = "arrow"
instead of "arrow" change to "legacy" --> save
but the problem is that now getting compare_df output empty.
need some help to resolve this issue.
if choice == "Modelling": chosen_target = st.selectbox('Choose the Target Column', df.columns) if st.button('Run Modelling'): setup(df, target=chosen_target, verbose = False) setup_df = pull() st.dataframe(setup_df) best_model = compare_models() compare_df = pull() st.info("model") st.dataframe(compare_df) best_model save_model(best_model, 'best_model')
Screenshot 2023-08-06 160922

TypeError: setup() got an unexpected keyword argument 'silent'

Code line: "setup(df, target=chosen_target,silent=True)"
I have "TypeError: setup() got an unexpected keyword argument 'silent'" problem when training the model.

When I delete "silent=True", I have another problem:
"Reason: tried: '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/usr/local/lib/libomp.dylib' (no such file), '/usr/lib/libomp.dylib' (no such file, not in dyld cache)"

ValueError: could not convert string to float: 'ptsd'

When trying to run modelling
Encountering this error

/ValueError: could not convert string to float: 'ptsd' Traceback:

 File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
      exec(code, module.__dict__)
  File "/home/vk/automl/app.py", line 47, in <module>
      df.astype(float)
  File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/pandas/core/generic.py", line 6240, in astype
      new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
  File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 448, in astype
      return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
  File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 352, in apply
      applied = getattr(b, f)(**kwargs)
  File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/pandas/core/internals/blocks.py", line 526, in astype
      new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
  File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/pandas/core/dtypes/astype.py", line 299, in astype_array_safe
      new_values = astype_array(values, dtype, copy=copy)
  File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/pandas/core/dtypes/astype.py", line 230, in astype_array
      values = astype_nansafe(values, dtype, copy=copy)
  File "/home/vk/miniconda3/envs/tf/lib/python3.9/site-packages/pandas/core/dtypes/astype.py", line 170, in astype_nansafe
      return arr.astype(dtype, copy=True)

lots of bugs inside the code! chatGPT solved it!

import streamlit as st
import plotly.express as px
from pycaret.regression import setup, compare_models, pull, save_model, load_model
import pandas_profiling
import pandas as pd
from streamlit_pandas_profiling import st_profile_report
import os

if os.path.exists('./dataset.csv'):
df = pd.read_csv('dataset.csv', index_col=None)
else:
df = pd.DataFrame() # default dataframe if one has not been provided

with st.sidebar:
st.image("https://www.onepointltd.com/wp-content/uploads/2020/03/inno2.png")
st.title("AutoNickML")
choice = st.radio("Navigation", ["Upload","Profiling","Modelling", "Download"])
st.info("This project application helps you build and explore your data.")

if choice == "Upload":
st.title("Upload Your Dataset")
file = st.file_uploader("Upload Your Dataset")
if file:
df = pd.read_csv(file, index_col=None)
df.to_csv('dataset.csv', index=None)
st.dataframe(df)

if choice == "Profiling":
st.title("Exploratory Data Analysis")
profile_df = df.profile_report()
st_profile_report(profile_df)

if choice == "Modelling":
chosen_target = st.selectbox('Choose the Target Column', df.columns)
if chosen_target and st.button('Run Modelling'):
setup(df, target=chosen_target, silent=True)
compare_df = pull()
st.dataframe(compare_df)
best_model = compare_models()
save_model(best_model, 'best_model')

if choice == "Download":
if os.path.exists('best_model.pkl'):
with open('best_model.pkl', 'rb') as f:
st.download_button('Download Model', f, file_name="best_model.pkl")
else:
st.warning("No model has been saved yet. Please run modelling first.")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.