Alshargi commited on
Commit
e4b7943
·
verified ·
1 Parent(s): a86d5d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -79,18 +79,21 @@ def prepare_text(text):
79
 
80
 
81
 
82
- # Load the model from the local folder
83
- model = pipeline("text-classification", model="arabic-msa-dialects-segmentation-v1.pkl")
 
84
 
85
 
86
  # Slider to select a value
87
  x = st.slider('Select a value')
 
 
88
  themaxres = x
89
  dd = x.replace("،", "")
90
  dd = dd.replace("؟", "")
91
 
92
  gg = word_tokenize(dd)
93
- result = model.predict([features(gg, index) for index in range(len(gg))])
94
 
95
 
96
  cc = ""
@@ -102,3 +105,7 @@ for x, y in zip(gg, result):
102
  st.write("Prediction:", cc)
103
 
104
 
 
 
 
 
 
79
 
80
 
81
 
82
+ # Load the model from the local file
83
+ model_path = "arabic-msa-dialects-segmentation-v1.pkl"
84
+ model = pipeline("text-classification", model=model_path)
85
 
86
 
87
  # Slider to select a value
88
  x = st.slider('Select a value')
89
+
90
+
91
  themaxres = x
92
  dd = x.replace("،", "")
93
  dd = dd.replace("؟", "")
94
 
95
  gg = word_tokenize(dd)
96
+ result = model([features(gg, index) for index in range(len(gg))])
97
 
98
 
99
  cc = ""
 
105
  st.write("Prediction:", cc)
106
 
107
 
108
+
109
+
110
+
111
+