Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.15.0
metadata
title: Prompt Craft
emoji: π
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 5.12.0
app_file: app.py
pinned: false
Prompt Craft
Overview
This project leverages HuggingFace's smolagent
library to create AI-generated images through a streamlined workflow.
Technology Stack
- Agent Framework: Uses HuggingFace's
smolagent
withTool.from_space
implementation - Image Generation: Powered by the
FLUX.1-schnell
model - Prompt Enhancement: Utilizes
Qwen/Qwen2.5-Coder-32B-Instruct
model via HuggingFace Inference API
How It Works
- User provides an initial image prompt
- The Qwen model enhances the prompt for better results
- FLUX.1-schnell generates the final image based on the improved prompt
Links
Prerequisites
- Python 3.x
- pip
Setup
Clone the repository:
git clone https://github.com/tebinraouf/agenticai_examples.git cd agenticai_examples
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
Create a
.env
file in the root directory of the project and add your environment variables:touch .env
Example
.env
file:HF_TOKEN=your_api_key_here
Install the dependencies:
pip install -r requirements.txt
Run the project:
python app.py
Contributing
Please read CONTRIBUTING.md
for details on our code of conduct, and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE
file for details.