Kaushik Bar commited on
Commit
c09ae13
1 Parent(s): ab91900

first commit

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -3,8 +3,8 @@ import gradio as gr
3
  import fasttext, torch, clip
4
  from sentence_transformers import SentenceTransformer, util
5
 
6
- model_en, preprocess_en = clip.load(model_tag="ViT-B/32")
7
- model_multi = SentenceTransformer(model_tag="sentence-transformers/clip-ViT-B-32-multilingual-v1")
8
 
9
  def prep_examples():
10
  example_text1 = "Coronavirus disease (COVID-19) is an infectious disease caused by the SARS-CoV-2 virus. Most \
@@ -85,7 +85,6 @@ def sequence_to_classify(text, labels):
85
  lang = detect_lang(text)
86
  if lang == 'en':
87
  model = model_en
88
- preprocess = preprocess_en
89
  hypothesis_template = "This example is {}."
90
  else:
91
  model = model_multi
 
3
  import fasttext, torch, clip
4
  from sentence_transformers import SentenceTransformer, util
5
 
6
+ model_en, _ = clip.load("ViT-B/32")
7
+ model_multi = SentenceTransformer("sentence-transformers/clip-ViT-B-32-multilingual-v1")
8
 
9
  def prep_examples():
10
  example_text1 = "Coronavirus disease (COVID-19) is an infectious disease caused by the SARS-CoV-2 virus. Most \
 
85
  lang = detect_lang(text)
86
  if lang == 'en':
87
  model = model_en
 
88
  hypothesis_template = "This example is {}."
89
  else:
90
  model = model_multi