sundaram07 commited on
Commit
c520681
·
verified ·
1 Parent(s): ff5ddfb

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +11 -11
src/streamlit_app.py CHANGED
@@ -1,15 +1,15 @@
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
@@ -17,9 +17,9 @@ 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('my_distilbert_classifier.keras')
25
 
 
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
 
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('my_distilbert_classifier.keras')
25