Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,7 @@ def custom_tokenizer(text):
|
|
| 8 |
# Modify this function to match your original tokenizer logic
|
| 9 |
return text.lower().split()
|
| 10 |
|
| 11 |
-
|
| 12 |
-
st.write("π Files in current directory:", os.listdir())
|
| 13 |
|
| 14 |
# π Load model files
|
| 15 |
try:
|
|
@@ -36,7 +35,7 @@ def predict_tags(title, description):
|
|
| 36 |
input_vector = vectorizer.transform([input_text])
|
| 37 |
prediction = model.predict(input_vector)
|
| 38 |
predicted_tags = mlb.inverse_transform(prediction)
|
| 39 |
-
|
| 40 |
if predicted_tags and predicted_tags[0]:
|
| 41 |
return "β
Predicted Tags: " + ", ".join(predicted_tags[0])
|
| 42 |
else:
|
|
|
|
| 8 |
# Modify this function to match your original tokenizer logic
|
| 9 |
return text.lower().split()
|
| 10 |
|
| 11 |
+
|
|
|
|
| 12 |
|
| 13 |
# π Load model files
|
| 14 |
try:
|
|
|
|
| 35 |
input_vector = vectorizer.transform([input_text])
|
| 36 |
prediction = model.predict(input_vector)
|
| 37 |
predicted_tags = mlb.inverse_transform(prediction)
|
| 38 |
+
st.write(predicted_tags)
|
| 39 |
if predicted_tags and predicted_tags[0]:
|
| 40 |
return "β
Predicted Tags: " + ", ".join(predicted_tags[0])
|
| 41 |
else:
|