update app
Browse files
app.py
CHANGED
@@ -13,9 +13,6 @@ processor = CLIPProcessor.from_pretrained(model_id)
|
|
13 |
|
14 |
|
15 |
|
16 |
-
def greet(name):
|
17 |
-
return "Hello " + name + "!!"
|
18 |
-
|
19 |
def load_data():
|
20 |
global imagenette
|
21 |
imagenette = load_dataset(
|
@@ -33,7 +30,6 @@ def embedding_input(text_input):
|
|
33 |
|
34 |
def embedding_img():
|
35 |
global images
|
36 |
-
load_data()
|
37 |
sample_idx= np.random.randint(0, len(imagenette)+1, 100).tolist()
|
38 |
images = [imagenette[i]['image'] for i in sample_idx]
|
39 |
batch_sie = 5
|
@@ -73,5 +69,6 @@ def norm_val(text_input):
|
|
73 |
|
74 |
|
75 |
if __name__ == "__main__":
|
|
|
76 |
iface = gr.Interface(fn=norm_val, inputs="text", outputs="image")
|
77 |
iface.launch(inline = False )
|
|
|
13 |
|
14 |
|
15 |
|
|
|
|
|
|
|
16 |
def load_data():
|
17 |
global imagenette
|
18 |
imagenette = load_dataset(
|
|
|
30 |
|
31 |
def embedding_img():
|
32 |
global images
|
|
|
33 |
sample_idx= np.random.randint(0, len(imagenette)+1, 100).tolist()
|
34 |
images = [imagenette[i]['image'] for i in sample_idx]
|
35 |
batch_sie = 5
|
|
|
69 |
|
70 |
|
71 |
if __name__ == "__main__":
|
72 |
+
load_data()
|
73 |
iface = gr.Interface(fn=norm_val, inputs="text", outputs="image")
|
74 |
iface.launch(inline = False )
|