ashishraics commited on
Commit
d670ff4
1 Parent(s): 1948818

update app readme

Browse files
Files changed (3) hide show
  1. app.py +5 -7
  2. hf_space1.png +0 -0
  3. zeroshot_clf_helper.py +0 -1
app.py CHANGED
@@ -9,6 +9,7 @@ import os
9
  import time
10
  import plotly.express as px
11
  import plotly.graph_objects as go
 
12
  global _plotly_config
13
  _plotly_config={'displayModeBar': False}
14
 
@@ -229,18 +230,15 @@ def zs_mlm_task_selected(task,
229
 
230
  ############## Pre-Download & instantiate objects for Zero shot MLM analysis ********************* END **********************************
231
 
 
 
232
 
233
  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
  st.markdown("---")
238
- st.subheader("Info on Zeroshot Text 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")
242
- st.write("Relevant Paper - https://paperswithcode.com/paper/zero-shot-text-classification-with-generative")
243
- st.markdown()
244
 
245
  if select_task == 'Detect Sentiment':
246
  t1=time.time()
9
  import time
10
  import plotly.express as px
11
  import plotly.graph_objects as go
12
+ from PIL import Image
13
  global _plotly_config
14
  _plotly_config={'displayModeBar': False}
15
 
230
 
231
  ############## Pre-Download & instantiate objects for Zero shot MLM analysis ********************* END **********************************
232
 
233
+ # Image.open('hf_space1.png').convert('RGB').save('hf_space1.png')
234
+ img = Image.open("hf_space1.png")
235
 
236
  if select_task=='README':
237
  st.header("NLP Summary")
238
+ st.write(f"The App gives you ability to 1) Detect Sentiment, 2) Zeroshot Classification.Currently.It has {total_threads} CPU cores but only 1 is available per user so "
239
  f"inference time will be on the higher side.")
240
  st.markdown("---")
241
+ st.image(img)
 
 
 
 
 
242
 
243
  if select_task == 'Detect Sentiment':
244
  t1=time.time()
hf_space1.png ADDED
zeroshot_clf_helper.py CHANGED
@@ -5,7 +5,6 @@ import subprocess
5
  import numpy as np
6
  import pandas as pd
7
  import transformers
8
- import transformers.convert_graph_to_onnx as onnx_convert
9
  from pathlib import Path
10
  import streamlit as st
11
 
5
  import numpy as np
6
  import pandas as pd
7
  import transformers
 
8
  from pathlib import Path
9
  import streamlit as st
10