Spaces:
Sleeping
Sleeping
Kartheekb7
commited on
Commit
•
f02ccdd
1
Parent(s):
ff751c5
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,8 @@ def create_interface():
|
|
65 |
text_features /= text_features.norm(dim=-1, keepdim=True)
|
66 |
|
67 |
text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)
|
68 |
-
|
|
|
69 |
return correct_label
|
70 |
|
71 |
with gr.Blocks() as demo:
|
|
|
65 |
text_features /= text_features.norm(dim=-1, keepdim=True)
|
66 |
|
67 |
text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)
|
68 |
+
labels1 = labels+[label1,"not a fruit"]
|
69 |
+
correct_label = labels1[(text_probs.argmax().item())]
|
70 |
return correct_label
|
71 |
|
72 |
with gr.Blocks() as demo:
|