Spaces:
Running
Running
fixing CLIP dependency issue
Browse files
app.py
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from PIL import Image
|
@@ -7,10 +11,6 @@ import clip
|
|
7 |
import torch.nn as nn
|
8 |
from torchvision.transforms import transforms
|
9 |
|
10 |
-
import os
|
11 |
-
|
12 |
-
os.system('pip install git+https://github.com/openai/CLIP.git')
|
13 |
-
|
14 |
device = device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
|
16 |
class OpenaAIClip(nn.Module):
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
os.system('pip install git+https://github.com/openai/CLIP.git')
|
4 |
+
|
5 |
import gradio as gr
|
6 |
|
7 |
from PIL import Image
|
|
|
11 |
import torch.nn as nn
|
12 |
from torchvision.transforms import transforms
|
13 |
|
|
|
|
|
|
|
|
|
14 |
device = device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
15 |
|
16 |
class OpenaAIClip(nn.Module):
|