Gavit0 commited on
Commit
b197266
Β·
verified Β·
1 Parent(s): 987e3a1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -11
README.md CHANGED
@@ -57,21 +57,20 @@ The model addresses the issue of data scarcity in medical and anomaly detection
57
  ## πŸ“₯ Download and Installation
58
  To use this model with **Diffusers**, follow these steps:
59
 
60
- ```python
61
  from diffusers import StableDiffusionPipeline
62
  from peft import PeftModel
63
  import torch
64
 
65
  # Load the base model
66
- base_model = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1")
67
 
68
  # Load LoRA weights
69
- lora_model = PeftModel.from_pretrained(base_model, "G
70
- ![sd-2.1-infarct-lora-051-3501614513.jpg](https://cdn-uploads.huggingface.co/production/uploads/644580ada56444c355da1b15/vqPxaiq1iKpC1EQKp-gnD.jpeg)
71
- avit0/InfarctImage")
72
 
73
- lora_model.to(torch.device("cuda")) # Move to GPU if available
74
- ```
 
75
 
76
  ## πŸ“Š Training Data
77
  The model was trained on a dataset of 100 manually annotated images, including:
@@ -98,11 +97,11 @@ The dataset was processed and annotated using **BLIP (Bootstrapping Language-Ima
98
 
99
  ## πŸ† Usage Examples
100
  You can generate images using prompts like:
101
- ```python
102
- prompt = "Person with expression of pain due to a heart attack, A middle-aged man clutching his chest in pain, showing signs of a heart attack."
103
- image = lora_model(prompt=prompt).images[0]
104
  image.show()
105
- ```
106
 
107
  ## πŸ“œ License
108
  This model is distributed under the **MIT License**.
 
57
  ## πŸ“₯ Download and Installation
58
  To use this model with **Diffusers**, follow these steps:
59
 
60
+ ```python
61
  from diffusers import StableDiffusionPipeline
62
  from peft import PeftModel
63
  import torch
64
 
65
  # Load the base model
66
+ base_model = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1")
67
 
68
  # Load LoRA weights
69
+ lora_model = PeftModel.from_pretrained(base_model, "Gavit0/InfarctImage")
 
 
70
 
71
+ lora_model.to(torch.device("cuda")) # Move to GPU if available
72
+
73
+ ```
74
 
75
  ## πŸ“Š Training Data
76
  The model was trained on a dataset of 100 manually annotated images, including:
 
97
 
98
  ## πŸ† Usage Examples
99
  You can generate images using prompts like:
100
+ ```python
101
+ prompt = "Person with expression of pain due to a heart attack, A middle-aged man clutching his chest in pain, showing signs of a heart attack."
102
+ image = lora_model(prompt=prompt).images[0]
103
  image.show()
104
+ ```
105
 
106
  ## πŸ“œ License
107
  This model is distributed under the **MIT License**.