charann29 / opensource

105 stars 225 forks source link

deployment issue : streamlit #416

Open Jatavedreddy opened 2 weeks ago

Jatavedreddy commented 2 weeks ago

The app is running fine on localhost , having the issue with deployment using streamlit

shows the follow error : image

requirements.txt:(changed a few packages as some old versions were not installing) h5py==3.6.0 html5lib==1.1 Keras numpy pandas plotly requests==2.31.0 scikit-learn==1.0.1 streamlit tensorflow-cpu yfinance

charann29 commented 2 weeks ago

Deploying Your Streamlit App

Step 1: Create a New GitHub Repository

  1. Go to GitHub and log in to your account.
  2. Click the New button to create a new repository.
  3. Name your repository (e.g., streamlit-deployment).
  4. Add a description (optional).
  5. Choose the repository's visibility (public or private).
  6. Click on Create repository.

Step 2: Add Your Code to the Repository

  1. Clone the repository to your local machine:
    git clone https://github.com/your-username/streamlit-deployment.git
  2. Navigate to the repository folder:
    cd streamlit-deployment
  3. Copy your existing code into this folder.
  4. Ensure you have an app.py file as the main entry point for your Streamlit app.
  5. Create a requirements.txt file with the following content:
    h5py==3.6.0
    html5lib==1.1
    Keras
    numpy
    pandas
    plotly
    requests==2.31.0
    scikit-learn==1.0.1
    streamlit
    tensorflow-cpu
    yfinance
  6. Add all files to the repository and commit:
    git add .
    git commit -m "Initial commit with app code"
    git push origin main

Step 3: Deploy Your App with Streamlit

  1. Go to Streamlit Sharing and log in with your GitHub account.
  2. Click on New app and select the repository you just created.
  3. Choose the branch (e.g., main) and the main file (e.g., app.py).
  4. Click on Deploy.

Troubleshooting Deployment Issues

Jatavedreddy commented 2 weeks ago

its working now , after changing the python version to 3.8 in streamlit

charann29 commented 2 weeks ago

Great to hear this buddy , deploy it and the link in the readme file