sundaram07 commited on
Commit
aab722c
·
verified ·
1 Parent(s): 50b68f4

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -15
src/streamlit_app.py CHANGED
@@ -1,25 +1,13 @@
1
 
2
- # import nltk
3
- # import os
4
-
5
- # # Set local download directory (inside Hugging Face's writable space)
6
- # nltk_data_dir = os.path.join(os.path.dirname(__file__), "nltk_data")
7
-
8
- # # Download punkt tokenizer to local path
9
- # nltk.download("punkt", download_dir=nltk_data_dir)
10
-
11
- # # Set the path for NLTK to find data
12
- # nltk.data.path.append(nltk_data_dir)
13
-
14
  import streamlit as st
15
  import tensorflow as tf
16
  import numpy as np
17
  import re
18
  import nltk
19
 
20
- # # Ensure NLTK sentence tokenizer is available
21
- # nltk.download('punkt')
22
- # from nltk.tokenize import sent_tokenize
23
 
24
  model = tf.keras.models.load_model('src/my_distilbert_classifier.keras')
25
 
 
1
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  import streamlit as st
3
  import tensorflow as tf
4
  import numpy as np
5
  import re
6
  import nltk
7
 
8
+ # Ensure NLTK sentence tokenizer is available
9
+ nltk.download('punkt')
10
+ from nltk.tokenize import sent_tokenize
11
 
12
  model = tf.keras.models.load_model('src/my_distilbert_classifier.keras')
13