atanu0491 commited on
Commit
5ae8e1a
·
verified ·
1 Parent(s): f0eba1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -15,6 +15,8 @@ from flair.datasets import ColumnCorpus
15
  from flair.models import SequenceTagger
16
  from flair.trainers import ModelTrainer
17
 
 
 
18
 
19
 
20
  st.set_page_config(
@@ -80,8 +82,13 @@ QT_QTO --> _Ordinals_
80
  st.sidebar.info('সর্বশেষ সংশোধিত তারিখ: ০৪ এপ্রিল ২০২৫', icon="ℹ️")
81
 
82
 
 
 
 
 
83
 
84
-
 
85
  model = load_model('best-model-002.pt')
86
  #model = SequenceTagger.load('best-model-002.pt')
87
 
 
15
  from flair.models import SequenceTagger
16
  from flair.trainers import ModelTrainer
17
 
18
+ from huggingface_hub import hf_hub_download
19
+
20
 
21
 
22
  st.set_page_config(
 
82
  st.sidebar.info('সর্বশেষ সংশোধিত তারিখ: ০৪ এপ্রিল ২০২৫', icon="ℹ️")
83
 
84
 
85
+ model_path = hf_hub_download(
86
+ repo_id="atanu0491/indicpos",
87
+ filename="best-model-002.pt"
88
+ )
89
 
90
+ #model = torch.load(model_path, map_location=torch.device("cpu"))
91
+ model = load_model(model_path)
92
  model = load_model('best-model-002.pt')
93
  #model = SequenceTagger.load('best-model-002.pt')
94