Bagda commited on
Commit
4b65692
·
verified ·
1 Parent(s): f0c1900

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -14
app.py CHANGED
@@ -28,21 +28,9 @@ iface.launch()
28
 
29
  from diffusers import StableDiffusionPipeline
30
  import torch
31
- import gradio as gr
32
 
33
  pipe = StableDiffusionPipeline.from_pretrained(
34
  "Linaqruf/anything-v3.0",
35
- torch_dtype=torch.float16, # यह सिर्फ device-level पर effect करता है
36
- use_auth_token=True
37
  ).to("cuda")
38
-
39
- def generate(prompt):
40
- image = pipe(prompt).images[0]
41
- return image
42
-
43
- gr.Interface(
44
- fn=generate,
45
- inputs=gr.Textbox(label="Prompt"),
46
- outputs=gr.Image(type="pil"),
47
- title="Anything-v3 Thumbnail Generator"
48
- ).launch()
 
28
 
29
  from diffusers import StableDiffusionPipeline
30
  import torch
 
31
 
32
  pipe = StableDiffusionPipeline.from_pretrained(
33
  "Linaqruf/anything-v3.0",
34
+ torch_dtype=torch.float16, # यह सही है
35
+ use_auth_token=True # या HF_TOKEN अगर Space में चला रहे हो
36
  ).to("cuda")