Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,13 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
# Load the pre-trained model and tokenizer
|
3 |
model = AutoModel.from_pretrained("Alibaba-NLP/gte-multilingual-base", trust_remote_code=True)
|
4 |
tokenizer = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-multilingual-base", trust_remote_code=True)
|
@@ -32,3 +41,4 @@ iface = gr.Interface(
|
|
32 |
|
33 |
# Launch the Gradio interface
|
34 |
iface.launch()
|
|
|
|
1 |
|
2 |
+
# Import the necessary libraries
|
3 |
+
from transformers import AutoModel, AutoTokenizer
|
4 |
+
import torch
|
5 |
+
from torch.utils.data import DataLoader, Dataset
|
6 |
+
from sklearn.model_selection import train_test_split
|
7 |
+
from google.colab import files
|
8 |
+
import pandas as pd
|
9 |
+
import gradio as gr
|
10 |
+
|
11 |
# Load the pre-trained model and tokenizer
|
12 |
model = AutoModel.from_pretrained("Alibaba-NLP/gte-multilingual-base", trust_remote_code=True)
|
13 |
tokenizer = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-multilingual-base", trust_remote_code=True)
|
|
|
41 |
|
42 |
# Launch the Gradio interface
|
43 |
iface.launch()
|
44 |
+
|