Spaces:
Runtime error
Runtime error
JerryLiJinyi
commited on
Commit
•
d0b572e
1
Parent(s):
40836c2
Upload app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,6 @@ res = os.popen('python -m spacy download en_core_web_sm').read()
|
|
6 |
print(res)
|
7 |
|
8 |
|
9 |
-
# main function
|
10 |
def compressit(original_text, compressor1, ratio, maxlength):
|
11 |
|
12 |
if compressor1=="Selective Context":
|
@@ -50,7 +49,8 @@ demo = gr.Interface(
|
|
50 |
],
|
51 |
examples=[
|
52 |
["Read the following poem and summarize it: O Captain! My Captain! our fearful trip is done; The ship has weather'd every rack, the prize we sought is won; The port is near, the bells I hear, the people all exulting, While follow eyes the steady keel, the vessel grim and daring.", "Selective Context", 0.5, 0],
|
53 |
-
["Read the following poem and summarize it: O Captain! My Captain! our fearful trip is done; The ship has weather'd every rack, the prize we sought is won; The port is near, the bells I hear, the people all exulting, While follow eyes the steady keel, the vessel grim and daring.", "SCRL", 0, 16]
|
|
|
54 |
]
|
55 |
)
|
56 |
|
|
|
6 |
print(res)
|
7 |
|
8 |
|
|
|
9 |
def compressit(original_text, compressor1, ratio, maxlength):
|
10 |
|
11 |
if compressor1=="Selective Context":
|
|
|
49 |
],
|
50 |
examples=[
|
51 |
["Read the following poem and summarize it: O Captain! My Captain! our fearful trip is done; The ship has weather'd every rack, the prize we sought is won; The port is near, the bells I hear, the people all exulting, While follow eyes the steady keel, the vessel grim and daring.", "Selective Context", 0.5, 0],
|
52 |
+
["Read the following poem and summarize it: O Captain! My Captain! our fearful trip is done; The ship has weather'd every rack, the prize we sought is won; The port is near, the bells I hear, the people all exulting, While follow eyes the steady keel, the vessel grim and daring.", "SCRL", 0, 16],
|
53 |
+
["Read the following poem and summarize it: O Captain! My Captain! our fearful trip is done; The ship has weather'd every rack, the prize we sought is won; The port is near, the bells I hear, the people all exulting, While follow eyes the steady keel, the vessel grim and daring.", "KiS", 0, 256]
|
54 |
]
|
55 |
)
|
56 |
|