Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ word_segmenter = py_vncorenlp.VnCoreNLP(vncorenlp_path, annotators="wseg")
|
|
| 12 |
|
| 13 |
# Load your cross-encoder model (replace with your model name or path)
|
| 14 |
model_name = "truong1301/reranker_pho_BLAI" # Example model, replace with yours
|
| 15 |
-
cross_encoder = CrossEncoder(
|
| 16 |
|
| 17 |
# Function to preprocess text with Vietnamese word segmentation
|
| 18 |
def preprocess_text(text):
|
|
|
|
| 12 |
|
| 13 |
# Load your cross-encoder model (replace with your model name or path)
|
| 14 |
model_name = "truong1301/reranker_pho_BLAI" # Example model, replace with yours
|
| 15 |
+
cross_encoder = CrossEncoder(model_name, max_length=256, num_labels=1)
|
| 16 |
|
| 17 |
# Function to preprocess text with Vietnamese word segmentation
|
| 18 |
def preprocess_text(text):
|