- Create and activate a Python virtual environment:
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# .\venv\Scripts\activate- Install Python dependencies:
pip install -r requirements.txt- Run the Flask backend server:
python3 api.py- Navigate to the client directory:
cd client- Install Node dependencies:
npm install- Start the React frontend:
npm run start- Install Modal (if not already installed):
pip install modal- Run the Modal server:
modal serve text_to_image.pyMake sure all three components are running:
- Flask Backend (port 5001)
- React Frontend (port 3000)
- Modal Server
The application will be available at http://localhost:3000
- If you see connection errors, ensure all three servers are running
- Check that ports 3000 and 5001 are available
- Make sure you're using the virtual environment when running Python commands
There are some unneccesary files in the repository, such as the mock.py file, which is a mock transaction generator. Please ignore, we had lots of iterations!