Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,12 +11,12 @@ def compressit(original_text, compressor1, ratio, maxlength):
|
|
| 11 |
if compressor1=="Selective Context":
|
| 12 |
compressor = PromptCompressor(type='SCCompressor', lang='en', model='gpt2', device='cpu')
|
| 13 |
elif compressor1=="LLMLingua":
|
| 14 |
-
return "Sorry, currently we cannot provide services for LLMLingua due to the Huggingface Token issue. Please try other compressors."
|
| 15 |
elif compressor1=="LongLLMLingua":
|
| 16 |
-
return "Sorry, currently we cannot provide services for LongLLMLingua due to the Huggingface Token issue. Please try other compressors."
|
| 17 |
elif compressor1=="SCRL":
|
| 18 |
-
|
| 19 |
-
compressor = PromptCompressor(type='SCRLCompressor', model_dir="models/newsroom-L11/", device="cpu", tokenizer_dir="sentence-transformers/paraphrase-distilroberta-base-v2")
|
| 20 |
elif compressor1=="KiS":
|
| 21 |
compressor = PromptCompressor(type='KiSCompressor', device="cpu", model_dir="philippelaban/keep_it_simple")
|
| 22 |
else:
|
|
|
|
| 11 |
if compressor1=="Selective Context":
|
| 12 |
compressor = PromptCompressor(type='SCCompressor', lang='en', model='gpt2', device='cpu')
|
| 13 |
elif compressor1=="LLMLingua":
|
| 14 |
+
return "Sorry, currently we cannot provide services for LLMLingua due to the Huggingface Token issue. Please try other compressors.", 0
|
| 15 |
elif compressor1=="LongLLMLingua":
|
| 16 |
+
return "Sorry, currently we cannot provide services for LongLLMLingua due to the Huggingface Token issue. Please try other compressors.", 0
|
| 17 |
elif compressor1=="SCRL":
|
| 18 |
+
return "Sorry, but currently we found an issue in presenting SCRL on Huggingface, you can try this compressor from our GitHub repository.", 0
|
| 19 |
+
# compressor = PromptCompressor(type='SCRLCompressor', model_dir="models/newsroom-L11/", device="cpu", tokenizer_dir="sentence-transformers/paraphrase-distilroberta-base-v2")
|
| 20 |
elif compressor1=="KiS":
|
| 21 |
compressor = PromptCompressor(type='KiSCompressor', device="cpu", model_dir="philippelaban/keep_it_simple")
|
| 22 |
else:
|