moiraai2024 commited on
Commit
a093335
·
verified ·
1 Parent(s): 56cb3d8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -7
README.md CHANGED
@@ -35,7 +35,8 @@ Key Features:
35
  # How to use it
36
  https://docs.unsloth.ai/get-started/install-and-update/conda-install
37
 
38
- ```
 
39
  conda create --name unsloth_env \
40
  python=3.11 \
41
  pytorch-cuda=12.1 \
@@ -50,7 +51,7 @@ conda activate unsloth_env
50
  pip install unsloth
51
  ```
52
 
53
- ```
54
  from unsloth import FastModel
55
  from transformers import CsmForConditionalGeneration
56
  import torch
@@ -93,12 +94,12 @@ print("\nFine-tuned model is ready for inference!")
93
  # Unsloth automatically handles moving the model to the GPU
94
  ```
95
 
96
- ```
97
  from transformers import AutoProcessor
98
  processor = AutoProcessor.from_pretrained("unsloth/csm-1b")
99
  ```
100
 
101
- ```
102
  greek_sentences = [
103
  "Σου μιλάααανε!",
104
  "Γεια σας, είμαι η Μίρα και σήμερα θα κάνουμε μάθημα Ελληνικων.",
@@ -107,12 +108,12 @@ greek_sentences = [
107
  ]
108
  ```
109
 
110
- ```
111
  from IPython.display import Audio, display
112
  import soundfile as sf
113
  ```
114
 
115
- ```
116
  # --- Configure the Generation ---
117
 
118
  int_ = 1
@@ -140,7 +141,7 @@ audio_values = model.generate(
140
  )
141
  ```
142
 
143
- ```
144
  audio = audio_values[0].to(torch.float32).cpu().numpy()
145
  sf.write("example_without_context.wav", audio, 24000)
146
  display(Audio(audio, rate=24000))
 
35
  # How to use it
36
  https://docs.unsloth.ai/get-started/install-and-update/conda-install
37
 
38
+
39
+ ```python
40
  conda create --name unsloth_env \
41
  python=3.11 \
42
  pytorch-cuda=12.1 \
 
51
  pip install unsloth
52
  ```
53
 
54
+ ```python
55
  from unsloth import FastModel
56
  from transformers import CsmForConditionalGeneration
57
  import torch
 
94
  # Unsloth automatically handles moving the model to the GPU
95
  ```
96
 
97
+ ```python
98
  from transformers import AutoProcessor
99
  processor = AutoProcessor.from_pretrained("unsloth/csm-1b")
100
  ```
101
 
102
+ ```python
103
  greek_sentences = [
104
  "Σου μιλάααανε!",
105
  "Γεια σας, είμαι η Μίρα και σήμερα θα κάνουμε μάθημα Ελληνικων.",
 
108
  ]
109
  ```
110
 
111
+ ```python
112
  from IPython.display import Audio, display
113
  import soundfile as sf
114
  ```
115
 
116
+ ```python
117
  # --- Configure the Generation ---
118
 
119
  int_ = 1
 
141
  )
142
  ```
143
 
144
+ ```python
145
  audio = audio_values[0].to(torch.float32).cpu().numpy()
146
  sf.write("example_without_context.wav", audio, 24000)
147
  display(Audio(audio, rate=24000))