Spaces:
Sleeping
Sleeping
Update links for paper, project, and code.
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ header = ("""
|
|
65 |
<h1></h1>
|
66 |
<h1>LLMLingua-2: Efficient and Faithful Task-Agnostic Prompt Compression via Data Distillation</h1>
|
67 |
<h3>Zhuoshi Pan, Qianhui Wu, Huiqiang Jiang, Menglin Xia, Xufang Luo, Jue Zhang, Qingwei Lin, Victor Ruehle, Yuqing Yang, Chin-Yew Lin, H. Vicky Zhao, Lili Qiu, and Dongmei Zhang</h3>
|
68 |
-
<h3><a href='' target='_blank' rel='noopener'>[
|
69 |
</div>
|
70 |
"""
|
71 |
)
|
@@ -74,7 +74,6 @@ css = """#anno-img .mask {opacity: 0.5; transition: all 0.2s ease-in-out;}
|
|
74 |
#anno-img .mask.active {opacity: 0.7}"""
|
75 |
|
76 |
original_prompt_text = """John: So, um, I've been thinking about the project, you know, and I believe we need to, uh, make some changes. I mean, we want the project to succeed, right? So, like, I think we should consider maybe revising the timeline.
|
77 |
-
|
78 |
Sarah: I totally agree, John. I mean, we have to be realistic, you know. The timeline is, like, too tight. You know what I mean? We should definitely extend it.
|
79 |
"""
|
80 |
# with gr.Blocks(title=title, theme=gr.themes.Soft(), css=css) as app:
|
@@ -114,7 +113,7 @@ with gr.Blocks(title=title, css=css) as app: # 'YenLai/Superhuman' 'HaleyCH/Hale
|
|
114 |
components=[gr.Textbox(visible=False, max_lines=3)],
|
115 |
samples=original_prompt_list,
|
116 |
type="index")
|
117 |
-
|
118 |
dataset.select(fn=lambda idx: (examples[idx]["original_prompt"], examples[idx]["QA_pairs"]),
|
119 |
inputs=[dataset],
|
120 |
outputs=[original_prompt, qa_pairs])
|
|
|
65 |
<h1></h1>
|
66 |
<h1>LLMLingua-2: Efficient and Faithful Task-Agnostic Prompt Compression via Data Distillation</h1>
|
67 |
<h3>Zhuoshi Pan, Qianhui Wu, Huiqiang Jiang, Menglin Xia, Xufang Luo, Jue Zhang, Qingwei Lin, Victor Ruehle, Yuqing Yang, Chin-Yew Lin, H. Vicky Zhao, Lili Qiu, and Dongmei Zhang</h3>
|
68 |
+
<h3><a href='https://llmlingua.com/llmlingua2.html' target='_blank' rel='noopener'>[Project]</a><a href='https://arxiv.org/pdf/2403.12968.pdf' target='_blank' rel='noopener'>[Paper]</a><a href='https://github.com/microsoft/LLMLingua' target='_blank' rel='noopener'>[Code]</a>
|
69 |
</div>
|
70 |
"""
|
71 |
)
|
|
|
74 |
#anno-img .mask.active {opacity: 0.7}"""
|
75 |
|
76 |
original_prompt_text = """John: So, um, I've been thinking about the project, you know, and I believe we need to, uh, make some changes. I mean, we want the project to succeed, right? So, like, I think we should consider maybe revising the timeline.
|
|
|
77 |
Sarah: I totally agree, John. I mean, we have to be realistic, you know. The timeline is, like, too tight. You know what I mean? We should definitely extend it.
|
78 |
"""
|
79 |
# with gr.Blocks(title=title, theme=gr.themes.Soft(), css=css) as app:
|
|
|
113 |
components=[gr.Textbox(visible=False, max_lines=3)],
|
114 |
samples=original_prompt_list,
|
115 |
type="index")
|
116 |
+
|
117 |
dataset.select(fn=lambda idx: (examples[idx]["original_prompt"], examples[idx]["QA_pairs"]),
|
118 |
inputs=[dataset],
|
119 |
outputs=[original_prompt, qa_pairs])
|