Spaces:
Runtime error
Runtime error
Change device to CPU.
Browse files
app.py
CHANGED
@@ -14,11 +14,13 @@ import tiktoken
|
|
14 |
compressors = {
|
15 |
"xlm-roberta-large": PromptCompressor(
|
16 |
model_name="microsoft/llmlingua-2-xlm-roberta-large-meetingbank",
|
17 |
-
use_llmlingua2=True
|
|
|
18 |
),
|
19 |
"mbert-base": PromptCompressor(
|
20 |
model_name="microsoft/llmlingua-2-bert-base-multilingual-cased-meetingbank",
|
21 |
-
use_llmlingua2=True
|
|
|
22 |
)
|
23 |
}
|
24 |
tokenizer = tiktoken.encoding_for_model("gpt-4")
|
|
|
14 |
compressors = {
|
15 |
"xlm-roberta-large": PromptCompressor(
|
16 |
model_name="microsoft/llmlingua-2-xlm-roberta-large-meetingbank",
|
17 |
+
use_llmlingua2=True,
|
18 |
+
device="cpu"
|
19 |
),
|
20 |
"mbert-base": PromptCompressor(
|
21 |
model_name="microsoft/llmlingua-2-bert-base-multilingual-cased-meetingbank",
|
22 |
+
use_llmlingua2=True,
|
23 |
+
device="cpu"
|
24 |
)
|
25 |
}
|
26 |
tokenizer = tiktoken.encoding_for_model("gpt-4")
|