A web-based text generation application powered by the LLaMA-Mesh model, built with Flask and Transformers.
This project provides a clean, user-friendly web interface for generating text using the LLaMA-Mesh language model. Users can input prompts and control the length of generated text through an intuitive web form.
requirements.txtgit clone <your-repository-url>
cd capstone
python -m venv .venv
Windows:
.venv\Scripts\activate
macOS/Linux:
source .venv/bin/activate
pip install -r requirements.txt
python app.py
The application will start on http://localhost:5000
http://localhost:5000You can also use the API directly:
curl -X POST http://localhost:5000/generate \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "input_text=Your prompt here&max_length=100"
capstone/
โโโ app.py # Main Flask application
โโโ index.html # Web interface template
โโโ requirements.txt # Python dependencies
โโโ .gitignore # Git ignore rules
โโโ .venv/ # Virtual environment (ignored)
โโโ README.md # This file
You can modify these parameters in app.py:
temperature: Controls randomness (0.1-2.0)top_p: Nucleus sampling parameter (0.1-1.0)max_length: Maximum output lengthnum_return_sequences: Number of sequences to generatedebug=True)Problem: Model too large for available RAM Solutions:
Problem: Version compatibility issues Solution:
pip install --upgrade flask werkzeug
Problem: GPU memory insufficient Solutions:
torch.device('cpu')Problem: Large model download/loading time Solutions:
~/.cache/huggingface/torch.no_grad() for inferencegit checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
Note: This application requires significant computational resources due to the large language model. Ensure your system meets the minimum requirements before installation.
A web-based text generation application powered by the LLaMA-Mesh model, built with Flask and Transformers.
This project provides a clean, user-friendly web interface for generating text using the LLaMA-Mesh language model. Users can input prompts and control the length of generated text through an intuitive web form.
requirements.txtgit clone <your-repository-url>
cd capstone
python -m venv .venv
Windows:
.venv\Scripts\activate
macOS/Linux:
source .venv/bin/activate
pip install -r requirements.txt
python app.py
The application will start on http://localhost:5000
http://localhost:5000You can also use the API directly:
curl -X POST http://localhost:5000/generate \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "input_text=Your prompt here&max_length=100"
capstone/
โโโ app.py # Main Flask application
โโโ index.html # Web interface template
โโโ requirements.txt # Python dependencies
โโโ .gitignore # Git ignore rules
โโโ .venv/ # Virtual environment (ignored)
โโโ README.md # This file
You can modify these parameters in app.py:
temperature: Controls randomness (0.1-2.0)top_p: Nucleus sampling parameter (0.1-1.0)max_length: Maximum output lengthnum_return_sequences: Number of sequences to generatedebug=True)Problem: Model too large for available RAM Solutions:
Problem: Version compatibility issues Solution:
pip install --upgrade flask werkzeug
Problem: GPU memory insufficient Solutions:
torch.device('cpu')Problem: Large model download/loading time Solutions:
~/.cache/huggingface/torch.no_grad() for inferencegit checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
Note: This application requires significant computational resources due to the large language model. Ensure your system meets the minimum requirements before installation.