Salt
commited on
Commit
·
2ac690a
1
Parent(s):
3c5e0fe
Update server.py
Browse files
server.py
CHANGED
@@ -20,7 +20,6 @@ import posthog
|
|
20 |
from chromadb.config import Settings
|
21 |
from sentence_transformers import SentenceTransformer
|
22 |
from werkzeug.middleware.proxy_fix import ProxyFix
|
23 |
-
import argparse
|
24 |
from transformers import AutoTokenizer, AutoProcessor, pipeline
|
25 |
from transformers import AutoModelForCausalLM, AutoModelForSeq2SeqLM
|
26 |
from transformers import BlipForConditionalGeneration, GPT2Tokenizer
|
@@ -31,22 +30,22 @@ from colorama import Fore, Style, init as colorama_init
|
|
31 |
|
32 |
colorama_init()
|
33 |
|
|
|
34 |
parser.add_argument(
|
35 |
"--classification-model", help="Load a custom text classification model"
|
36 |
)
|
37 |
|
|
|
|
|
|
|
38 |
port = 7860
|
39 |
host = "0.0.0.0"
|
40 |
|
41 |
summarization_model = (
|
42 |
-
|
43 |
-
if args.summarization_model
|
44 |
-
else DEFAULT_SUMMARIZATION_MODEL
|
45 |
)
|
46 |
classification_model = (
|
47 |
-
|
48 |
-
if args.classification_model
|
49 |
-
else DEFAULT_CLASSIFICATION_MODEL
|
50 |
)
|
51 |
|
52 |
|
|
|
20 |
from chromadb.config import Settings
|
21 |
from sentence_transformers import SentenceTransformer
|
22 |
from werkzeug.middleware.proxy_fix import ProxyFix
|
|
|
23 |
from transformers import AutoTokenizer, AutoProcessor, pipeline
|
24 |
from transformers import AutoModelForCausalLM, AutoModelForSeq2SeqLM
|
25 |
from transformers import BlipForConditionalGeneration, GPT2Tokenizer
|
|
|
30 |
|
31 |
colorama_init()
|
32 |
|
33 |
+
|
34 |
parser.add_argument(
|
35 |
"--classification-model", help="Load a custom text classification model"
|
36 |
)
|
37 |
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
port = 7860
|
42 |
host = "0.0.0.0"
|
43 |
|
44 |
summarization_model = (
|
45 |
+
Qiliang/bart-large-cnn-samsum-ChatGPT_v3
|
|
|
|
|
46 |
)
|
47 |
classification_model = (
|
48 |
+
joeddav/distilbert-base-uncased-go-emotions-student
|
|
|
|
|
49 |
)
|
50 |
|
51 |
|