ashishraics commited on
Commit
859202b
1 Parent(s): 59a7eba

update readme and mlm error fix

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -211,7 +211,7 @@ def zs_mlm_task_selected(task,
211
  zs_mlm_onnx_mdl_dir=zs_mlm_onnx_mdl_dir,
212
  zs_mlm_onnx_mdl_name=zs_mlm_onnx_mdl_name):
213
  ##model & tokenizer initialization for normal ZS classification
214
- model_zs_mlm=AutoModelForMaskedLM.from_pretrained(zs_mlm_mdl_dir)
215
  ##we just need tokenizer for inference and not model since onnx model is already saved
216
  # tokenizer_zs_mlm=AutoTokenizer.from_pretrained(zs_mlm_chkpt)
217
  tokenizer_zs_mlm = AutoTokenizer.from_pretrained(zs_mlm_mdl_dir)
@@ -234,6 +234,12 @@ if select_task=='README':
234
  st.header("NLP Summary")
235
  st.write(f"The current App deployed in Huggingface Space has {total_threads} CPU cores but only 1 is available per user so "
236
  f"inference time will be on the higher side.")
 
 
 
 
 
 
237
 
238
  if select_task == 'Detect Sentiment':
239
  t1=time.time()
 
211
  zs_mlm_onnx_mdl_dir=zs_mlm_onnx_mdl_dir,
212
  zs_mlm_onnx_mdl_name=zs_mlm_onnx_mdl_name):
213
  ##model & tokenizer initialization for normal ZS classification
214
+ # model_zs_mlm=AutoModelForMaskedLM.from_pretrained(zs_mlm_mdl_dir)
215
  ##we just need tokenizer for inference and not model since onnx model is already saved
216
  # tokenizer_zs_mlm=AutoTokenizer.from_pretrained(zs_mlm_chkpt)
217
  tokenizer_zs_mlm = AutoTokenizer.from_pretrained(zs_mlm_mdl_dir)
 
234
  st.header("NLP Summary")
235
  st.write(f"The current App deployed in Huggingface Space has {total_threads} CPU cores but only 1 is available per user so "
236
  f"inference time will be on the higher side.")
237
+ st.markdown("---")
238
+ st.subheader("Info on Zeroshot Classification")
239
+ st.write("* It has been implemented using 2 novel approaches")
240
+ st.write("1. Using Natural Language Inference")
241
+ st.write("2. Using Masked language Model from BERT")
242
+ st.write("* https://paperswithcode.com/paper/zero-shot-text-classification-with-generative")
243
 
244
  if select_task == 'Detect Sentiment':
245
  t1=time.time()