Use Here: ByteBusters
Ensure that all images used in the project are stored in a directory named images
.
-
Set Up a PythonAnywhere Account:
- Go to PythonAnywhere and sign up for a free account.
-
Upload Your Code:
- Go to the "Files" tab and upload your project files, including the
images
folder and your Python scripts.
- Go to the "Files" tab and upload your project files, including the
-
Set Up a Virtual Environment:
- Open a Bash console on PythonAnywhere.
- Navigate to your project directory.
- Create and activate a virtual environment:
python3.7 -m venv venv source venv/bin/activate
-
Install Dependencies:
- Install the necessary dependencies including
groq-python-sdk
:pip install -r requirements.txt pip install groq-python-sdk
- Install the necessary dependencies including
-
Configure Your Web App:
- Go to the "Web" tab and add a new web app.
- Choose
Manual configuration
and selectFlask
for the framework. - Set the
WSGI configuration file
to point to your Flask app's entry point.
Example WSGI Configuration:
import sys import os # Add your project directory to the sys.path project_home = '/home/yourusername/bytebusters' if project_home not in sys.path: sys.path = [project_home] + sys.path # Activate your virtual environment activate_this = os.path.expanduser('/home/yourusername/bytebusters/venv/bin/activate_this.py') with open(activate_this) as file_: exec(file_.read(), dict(__file__=activate_this)) # Import your Flask app from app import app as application # Change 'app' to your Flask app name