Kazilsky commited on
Commit
4b6f272
·
verified ·
1 Parent(s): 6117e3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -17
app.py CHANGED
@@ -1,18 +1,4 @@
1
- # --- Конфиг ---
2
- MODEL_ID = "microsoft/bitnet-b1.58-2B-4T-gguf" # Инструктивная версия лучше для чата
3
 
4
- import spaces
5
- from diffusers import DiffusionPipeline
6
-
7
- pipe = DiffusionPipeline.from_pretrained(MODEL_ID)
8
- pipe.to('cuda')
9
-
10
- @spaces.GPU
11
- def generate(prompt):
12
- return pipe(prompt).images
13
-
14
- gr.Interface(
15
- fn=generate,
16
- inputs=gr.Text(),
17
- outputs=gr.Gallery(),
18
- ).launch()
 
1
+ # Use a pipeline as a high-level helper
2
+ from transformers import pipeline
3
 
4
+ pipe = pipeline("text-generation", model="microsoft/bitnet-b1.58-2B-4T-gguf")