Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,12 +2,12 @@ import requests
|
|
2 |
import numpy as np
|
3 |
import gradio as gr
|
4 |
|
|
|
5 |
from transformers import CLIPProcessor, CLIPModel
|
6 |
|
7 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
8 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
9 |
|
10 |
-
|
11 |
def inference(input_img=None, input_text=None):
|
12 |
|
13 |
if input_img is not None and input_text is not None:
|
|
|
2 |
import numpy as np
|
3 |
import gradio as gr
|
4 |
|
5 |
+
## CLIP
|
6 |
from transformers import CLIPProcessor, CLIPModel
|
7 |
|
8 |
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
9 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
10 |
|
|
|
11 |
def inference(input_img=None, input_text=None):
|
12 |
|
13 |
if input_img is not None and input_text is not None:
|