Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,18 @@ from flores import code_mapping
|
|
3 |
from functools import lru_cache
|
4 |
import openai # 用于调用外部API
|
5 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
print(os.getenv('key'))
|
7 |
code_mapping = dict(sorted(code_mapping.items(), key=lambda item: item[0]))
|
8 |
flores_codes = list(code_mapping.keys())
|
|
|
3 |
from functools import lru_cache
|
4 |
import openai # 用于调用外部API
|
5 |
import os
|
6 |
+
import spaces
|
7 |
+
import gradio as gr
|
8 |
+
from sacremoses import MosesPunctNormalizer
|
9 |
+
from stopes.pipelines.monolingual.utils.sentence_split import get_split_algo
|
10 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
11 |
+
from flores import code_mapping
|
12 |
+
import platform
|
13 |
+
import torch
|
14 |
+
import nltk
|
15 |
+
from functools import lru_cache
|
16 |
+
|
17 |
+
|
18 |
print(os.getenv('key'))
|
19 |
code_mapping = dict(sorted(code_mapping.items(), key=lambda item: item[0]))
|
20 |
flores_codes = list(code_mapping.keys())
|