Spaces:
Build error
Build error
RobotJelly
commited on
Commit
·
774ccc1
1
Parent(s):
11f30d9
app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from io import BytesIO
|
|
9 |
import requests
|
10 |
import gradio as gr
|
11 |
# Load the openAI's CLIP model
|
12 |
-
model, preprocess = clip.load("ViT-B/32", jit=False)
|
13 |
#display output photo
|
14 |
def show_output_image(matched_images) :
|
15 |
image=[]
|
@@ -48,8 +48,8 @@ def image_search(search_text, search_image, option):
|
|
48 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
49 |
|
50 |
# Load the openAI's CLIP model
|
51 |
-
|
52 |
-
model = model.to(device)
|
53 |
|
54 |
# Input Text Query
|
55 |
#search_query = "The feeling when your program finally works"
|
|
|
9 |
import requests
|
10 |
import gradio as gr
|
11 |
# Load the openAI's CLIP model
|
12 |
+
#model, preprocess = clip.load("ViT-B/32", jit=False)
|
13 |
#display output photo
|
14 |
def show_output_image(matched_images) :
|
15 |
image=[]
|
|
|
48 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
49 |
|
50 |
# Load the openAI's CLIP model
|
51 |
+
model, preprocess = clip.load("ViT-B/32", device=device, jit=False)
|
52 |
+
#model = model.to(device)
|
53 |
|
54 |
# Input Text Query
|
55 |
#search_query = "The feeling when your program finally works"
|