This repository contains multiple projects using HuggingFace's diffusers and transformers libraries for training models, generating images, and performing text-related tasks such as sentiment analysis and text classification. The projects within this repository cover a wide range of applications, from generating user interface designs to fine-tuning pre-trained models for custom use cases.
This repository includes the following key workflows:
-
UI Design Generation with Stable Diffusion
- Generates UI mockups based on text prompts using a fine-tuned version of Stable Diffusion with LoRA (Low-Rank Adaptation).
- File:
generate_ui.py
-
Training with LoRA
- Fine-tunes Stable Diffusion models on custom datasets using LoRA to adapt large pre-trained models for specific tasks, such as UI design generation.
- File:
train_lora.py
-
ControlNet Integration
- Uses ControlNet with Stable Diffusion to control image generation based on structural inputs like pose estimation.
- File:
controlnet_integration.py
-
Sentiment Analysis & Text Classification
- Uses HuggingFace’s transformer models (BERT, GPT-2, etc.) for sentiment analysis and text classification tasks.
- File:
sentiment_analysis_and_classification.py
-
Text Generation with GPT-2
- Generates creative text using a pre-trained GPT-2 model, allowing for diverse text generation tasks.
- File:
text_generation_with_gpt2.py
- Stable Diffusion: Utilize pre-trained and fine-tuned models to generate UI designs, artwork, and more.
- LoRA Fine-Tuning: Fine-tune Stable Diffusion models using LoRA for more efficient adaptation to custom datasets.
- ControlNet Integration: Generate images with structured control using techniques like pose estimation.
- Sentiment & Text Analysis: Perform sentiment analysis and text classification on various input texts.
- Text Generation: Generate creative text based on prompts with GPT-2.
git clone https://github.com/xitrolisax/huggingface-training-repo.git cd huggingface-training-repo
bash Copy pip install -r requirements.txt
- UI Generation with Stable Diffusion File: generate_ui.py
This script allows you to generate UI designs from a text prompt using a pre-trained Stable Diffusion model fine-tuned with LoRA.
- Fine-Tuning with LoRA File: train_lora.py
This script fine-tunes a Stable Diffusion model using your custom dataset with LoRA for more efficient training.
- ControlNet Integration File: controlnet_integration.py
This script integrates ControlNet to guide the generation of images based on specific control inputs, such as pose or structure.
- Sentiment Analysis & Text Classification File: sentiment_analysis_and_classification.py
This script performs sentiment analysis and text classification using transformer-based models like BERT.
- Text Generation with GPT-2 File: text_generation_with_gpt2.py
This script uses a pre-trained GPT-2 model to generate text based on a given prompt.