Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,8 @@ from llmlingua import PromptCompressor
|
|
5 |
app = FastAPI()
|
6 |
|
7 |
# Initialize LLMLingua-2 for better compression
|
8 |
-
compressor = PromptCompressor(model_name="microsoft/llmlingua-2-bert-base-multilingual-cased-meetingbank",
|
|
|
9 |
|
10 |
class TextInput(BaseModel):
|
11 |
text: str
|
|
|
5 |
app = FastAPI()
|
6 |
|
7 |
# Initialize LLMLingua-2 for better compression
|
8 |
+
compressor = PromptCompressor(model_name="microsoft/llmlingua-2-bert-base-multilingual-cased-meetingbank",use_llmlingua2=True
|
9 |
+
, device_map="cpu")
|
10 |
|
11 |
class TextInput(BaseModel):
|
12 |
text: str
|