Spaces:
Runtime error
Runtime error
anas-awadalla
commited on
Commit
·
c063fb5
1
Parent(s):
130a7e8
more stuff
Browse files
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from PIL import Image
|
4 |
-
from huggingface_hub import hf_hub_download
|
|
|
|
|
|
|
5 |
|
6 |
demo_imgs = [
|
7 |
["images/chinchilla_web-1024x683.jpg", "images/shiba-inu-dog-in-the-snow.jpg"],
|
@@ -59,7 +62,6 @@ model.load_state_dict(torch.load(checkpoint_path), strict=False)
|
|
59 |
|
60 |
model.eval()
|
61 |
|
62 |
-
|
63 |
def generate(
|
64 |
idx,
|
65 |
image,
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from PIL import Image
|
4 |
+
from huggingface_hub import hf_hub_download, login
|
5 |
+
import os
|
6 |
+
|
7 |
+
login(token=os.environ["HUGGINGFACE_TOKEN"])
|
8 |
|
9 |
demo_imgs = [
|
10 |
["images/chinchilla_web-1024x683.jpg", "images/shiba-inu-dog-in-the-snow.jpg"],
|
|
|
62 |
|
63 |
model.eval()
|
64 |
|
|
|
65 |
def generate(
|
66 |
idx,
|
67 |
image,
|