Spaces:
Running
Running
Remove matplotlib custom font
Browse files
app.py
CHANGED
@@ -7,27 +7,14 @@ import gradio as gr
|
|
7 |
import torch
|
8 |
from sentence_transformers import SentenceTransformer, util
|
9 |
import numpy as np
|
10 |
-
import matplotlib.pyplot as plt
|
11 |
import ruptures as rpt
|
12 |
|
13 |
from util import sent_tokenize
|
14 |
|
15 |
|
16 |
-
_ST_MODELS = ['all-mpnet-base-v2', 'multi-qa-mpnet-base-dot-v1', 'all-MiniLM-L12-v2']
|
17 |
-
|
18 |
CACHE_DIR = '.cache'
|
19 |
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
20 |
-
|
21 |
-
plt.rcParams.update({
|
22 |
-
'font.family': 'Times New Roman', #'Arial', 'Helvetica'
|
23 |
-
'font.size': 12,
|
24 |
-
'axes.titlesize': 13,
|
25 |
-
'axes.labelsize': 12,
|
26 |
-
'xtick.labelsize': 11,
|
27 |
-
'ytick.labelsize': 11,
|
28 |
-
'legend.fontsize': 11,
|
29 |
-
'legend.title_fontsize': 11
|
30 |
-
})
|
31 |
|
32 |
|
33 |
def embed_sentences(sentences, embedder_fn, cache_path):
|
|
|
7 |
import torch
|
8 |
from sentence_transformers import SentenceTransformer, util
|
9 |
import numpy as np
|
|
|
10 |
import ruptures as rpt
|
11 |
|
12 |
from util import sent_tokenize
|
13 |
|
14 |
|
|
|
|
|
15 |
CACHE_DIR = '.cache'
|
16 |
DEVICE = 'cuda' if torch.cuda.is_available() else 'cpu'
|
17 |
+
_ST_MODELS = ['all-mpnet-base-v2', 'multi-qa-mpnet-base-dot-v1', 'all-MiniLM-L12-v2']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
|
20 |
def embed_sentences(sentences, embedder_fn, cache_path):
|