kargaranamir commited on
Commit
3c733b6
·
1 Parent(s): b885d03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -6,6 +6,9 @@ from utils import *
6
  HengamTransW = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransW.pth")
7
  HengamTransA = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransA.pth")
8
 
 
 
 
9
 
10
  # APP
11
  st.set_page_config(
@@ -57,10 +60,9 @@ with st.form(key="my_form"):
57
  )
58
 
59
  if ModelType == 'HengamTransW.pth':
60
- ModelPath = HengamTransW
61
  else:
62
- ModelPath = HengamTransA
63
- ner = NER(model_path=ModelPath, tags=['B-TIM', 'I-TIM', 'B-DAT', 'I-DAT', 'O'])
64
 
65
  with c2:
66
  doc = st.text_area(
 
6
  HengamTransW = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransW.pth")
7
  HengamTransA = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransA.pth")
8
 
9
+ ner_W = NER(model_path=HengamTransW, tags=['B-TIM', 'I-TIM', 'B-DAT', 'I-DAT', 'O'])
10
+ ner_A = NER(model_path=HengamTransA, tags=['B-TIM', 'I-TIM', 'B-DAT', 'I-DAT', 'O'])
11
+
12
 
13
  # APP
14
  st.set_page_config(
 
60
  )
61
 
62
  if ModelType == 'HengamTransW.pth':
63
+ ner = ner_W
64
  else:
65
+ ner = ner_A
 
66
 
67
  with c2:
68
  doc = st.text_area(