sdhanabal1 commited on
Commit
338f4fe
1 Parent(s): c4259fc

Tune pipeline parameters

Browse files
Summarizer.py CHANGED
@@ -42,7 +42,8 @@ class Summarizer:
42
 
43
  def abstractive_summary(self, extract_summary_sentences: list) -> list:
44
  extract_summary = " ".join([sentence for sentence in extract_summary_sentences])
 
45
  abstractive_summary_list = []
46
- for result in self.pipeline(wrap(extract_summary, 512)):
47
  abstractive_summary_list.append(result['summary_text'])
48
  return abstractive_summary_list
 
42
 
43
  def abstractive_summary(self, extract_summary_sentences: list) -> list:
44
  extract_summary = " ".join([sentence for sentence in extract_summary_sentences])
45
+ wrapped_sentences = wrap(extract_summary, 2048)
46
  abstractive_summary_list = []
47
+ for result in self.pipeline(wrapped_sentences, min_length=5, max_length=512):
48
  abstractive_summary_list.append(result['summary_text'])
49
  return abstractive_summary_list
app.py CHANGED
@@ -1,4 +1,3 @@
1
- import html
2
  import os
3
  from typing import AnyStr
4
 
 
 
1
  import os
2
  from typing import AnyStr
3
 
sample-terms-and-conditions/spotify.txt CHANGED
@@ -159,7 +159,7 @@ Some jurisdictions do not allow the exclusion of implied warranties or limitatio
159
  Limitation of liability and time for filing a claim
160
  YOU AGREE THAT YOUR SOLE AND EXCLUSIVE REMEDY FOR ANY PROBLEMS OR DISSATISFACTION WITH THE SPOTIFY SERVICE IS TO UNINSTALL ANY SPOTIFY SOFTWARE AND TO STOP USING THE SPOTIFY SERVICE. YOU AGREE THAT SPOTIFY HAS NO OBLIGATION OR LIABILITY ARISING FROM OR RELATED TO THIRD-PARTY APPLICATIONS OR THE CONTENT THEREOF MADE AVAILABLE THROUGH OR IN CONNECTION WITH THE SPOTIFY SERVICE, AND WHILE YOUR RELATIONSHIP WITH SUCH THIRD-PARTY APPLICATIONS MAY BE GOVERNED BY SEPARATE AGREEMENTS WITH SUCH THIRD PARTIES, YOUR SOLE AND EXCLUSIVE REMEDY, AS WITH RESPECT TO SPOTIFY, FOR ANY PROBLEMS OR DISSATISFACTION WITH ANY THIRD-PARTY APPLICATIONS OR THE CONTENT THEREOF, IS TO UNINSTALL OR STOP USING SUCH THIRD-PARTY APPLICATIONS.
161
 
162
- IN NO EVENT WILL SPOTIFY, ITS OFFICERS, SHAREHOLDERS, EMPLOYEES, AGENTS, DIRECTORS, SUBSIDIARIES, AFFILIATES, SUCCESSORS, ASSIGNS, SUPPLIERS, OR LICENSORS BE LIABLE FOR (1) ANY INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, EXEMPLARY, OR CONSEQUENTIAL DAMAGES; (2) ANY LOSS OF USE, DATA, BUSINESS, OR PROFITS (WHETHER DIRECT OR INDIRECT), IN ALL CASES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SPOTIFY SERVICE, DEVICES, THIRD-PARTY APPLICATIONS, OR THIRD-PARTY APPLICATION CONTENT, REGARDLESS OF LEGAL THEORY, WITHOUT REGARD TO WHETHER SPOTIFY HAS BEEN WARNED OF THE POSSIBILITY OF THOSE DAMAGES, AND EVEN IF A REMEDY FAILS OF ITS ESSENTIAL PURPOSE; OR (3) AGGREGATE LIABILITY FOR ALL CLAIMS RELATING TO THE SPOTIFY SERVICE, THIRD-PARTY APPLICATIONS, OR THIRD-PARTY APPLICATION CONTENT MORE THAN THE GREATER OF (A) THE AMOUNTS PAID BY YOU TO SPOTIFY DURING THE TWELVE MONTHS PRIOR TO THE FIRST CLAIM; OR $30.00.
163
 
164
  For clarification, these Terms do not limit Spotify's liability for fraud, fraudulent misrepresentation, death or personal injury to the extent that applicable law would prohibit such a limitation.
165
 
@@ -194,7 +194,7 @@ Either you or we may start arbitration proceedings. Any arbitration between you
194
 
195
  Any arbitration hearings will be conducted by phone or videoconference to the extent possible, but if the arbitrator determines that a hearing should be conducted in person, the locale for such hearing shall be determined by the arbitrator in accordance with the AAA Rules.
196
 
197
- If you choose to file an arbitration proceeding and you are required to pay a filing fee, Spotify will reimburse you for that filing fee, unless your claim is for greater than US $10,000, in which case you will be responsible for the filing fee. Spotify will pay any other arbitration fees, including your share of arbitrator compensation, unless otherwise required by AAA Rules or court order. Regardless of the manner in which the arbitration is conducted, the arbitrator shall issue a reasoned written decision sufficient to explain the essential findings and conclusions on which the decision and award, if any, are based. The arbitrator may make rulings and resolve disputes as to the payment and reimbursement of fees or expenses at any time during the proceeding and upon request from either party made within 14 days of the arbitrator's ruling on the merits.
198
 
199
  Notice; process
200
  A party who intends to seek arbitration must first send a written notice of the dispute to the other, by electronic mail to legal@spotify.com and by certified mail, Federal Express, UPS, or Express Mail (signature required) to the address below ("Notice"). Spotify's address for Notice is: Spotify USA Inc., Attn: General Counsel, 4 World Trade Center, 150 Greenwich Street, 62nd Floor, New York, New York 10007, USA. The Notice must (1) describe the nature and basis of the claim or dispute; and (2) set forth the specific relief sought ("Demand"). We agree to use good faith efforts to resolve the claim directly, but if we do not reach an agreement to do so within 30 days after the Notice is received, you or Spotify may commence an arbitration proceeding. During the arbitration, the amount of any settlement offer made by you or Spotify shall not be disclosed to the arbitrator until after the arbitrator makes a final decision and award, if any. In the event our dispute is finally resolved through arbitration in your favor, and the arbitrator issues you an award that is greater than the value of Spotify's last written settlement offer, then Spotify will instead pay you either the amount of the award or $1,000, whichever is greater. All documents and information disclosed in the course of the arbitration shall be kept strictly confidential by the recipient and shall not be used by the recipient for any purpose other than for purposes of the arbitration or the enforcement of the arbitrator's decision and award and shall not be disclosed except in confidence to persons who have a need to know for such purposes or as required by applicable law.
 
159
  Limitation of liability and time for filing a claim
160
  YOU AGREE THAT YOUR SOLE AND EXCLUSIVE REMEDY FOR ANY PROBLEMS OR DISSATISFACTION WITH THE SPOTIFY SERVICE IS TO UNINSTALL ANY SPOTIFY SOFTWARE AND TO STOP USING THE SPOTIFY SERVICE. YOU AGREE THAT SPOTIFY HAS NO OBLIGATION OR LIABILITY ARISING FROM OR RELATED TO THIRD-PARTY APPLICATIONS OR THE CONTENT THEREOF MADE AVAILABLE THROUGH OR IN CONNECTION WITH THE SPOTIFY SERVICE, AND WHILE YOUR RELATIONSHIP WITH SUCH THIRD-PARTY APPLICATIONS MAY BE GOVERNED BY SEPARATE AGREEMENTS WITH SUCH THIRD PARTIES, YOUR SOLE AND EXCLUSIVE REMEDY, AS WITH RESPECT TO SPOTIFY, FOR ANY PROBLEMS OR DISSATISFACTION WITH ANY THIRD-PARTY APPLICATIONS OR THE CONTENT THEREOF, IS TO UNINSTALL OR STOP USING SUCH THIRD-PARTY APPLICATIONS.
161
 
162
+ IN NO EVENT WILL SPOTIFY, ITS OFFICERS, SHAREHOLDERS, EMPLOYEES, AGENTS, DIRECTORS, SUBSIDIARIES, AFFILIATES, SUCCESSORS, ASSIGNS, SUPPLIERS, OR LICENSORS BE LIABLE FOR (1) ANY INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, EXEMPLARY, OR CONSEQUENTIAL DAMAGES; (2) ANY LOSS OF USE, DATA, BUSINESS, OR PROFITS (WHETHER DIRECT OR INDIRECT), IN ALL CASES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SPOTIFY SERVICE, DEVICES, THIRD-PARTY APPLICATIONS, OR THIRD-PARTY APPLICATION CONTENT, REGARDLESS OF LEGAL THEORY, WITHOUT REGARD TO WHETHER SPOTIFY HAS BEEN WARNED OF THE POSSIBILITY OF THOSE DAMAGES, AND EVEN IF A REMEDY FAILS OF ITS ESSENTIAL PURPOSE; OR (3) AGGREGATE LIABILITY FOR ALL CLAIMS RELATING TO THE SPOTIFY SERVICE, THIRD-PARTY APPLICATIONS, OR THIRD-PARTY APPLICATION CONTENT MORE THAN THE GREATER OF (A) THE AMOUNTS PAID BY YOU TO SPOTIFY DURING THE TWELVE MONTHS PRIOR TO THE FIRST CLAIM; OR USD 30.00.
163
 
164
  For clarification, these Terms do not limit Spotify's liability for fraud, fraudulent misrepresentation, death or personal injury to the extent that applicable law would prohibit such a limitation.
165
 
 
194
 
195
  Any arbitration hearings will be conducted by phone or videoconference to the extent possible, but if the arbitrator determines that a hearing should be conducted in person, the locale for such hearing shall be determined by the arbitrator in accordance with the AAA Rules.
196
 
197
+ If you choose to file an arbitration proceeding and you are required to pay a filing fee, Spotify will reimburse you for that filing fee, unless your claim is for greater than USD 10,000, in which case you will be responsible for the filing fee. Spotify will pay any other arbitration fees, including your share of arbitrator compensation, unless otherwise required by AAA Rules or court order. Regardless of the manner in which the arbitration is conducted, the arbitrator shall issue a reasoned written decision sufficient to explain the essential findings and conclusions on which the decision and award, if any, are based. The arbitrator may make rulings and resolve disputes as to the payment and reimbursement of fees or expenses at any time during the proceeding and upon request from either party made within 14 days of the arbitrator's ruling on the merits.
198
 
199
  Notice; process
200
  A party who intends to seek arbitration must first send a written notice of the dispute to the other, by electronic mail to legal@spotify.com and by certified mail, Federal Express, UPS, or Express Mail (signature required) to the address below ("Notice"). Spotify's address for Notice is: Spotify USA Inc., Attn: General Counsel, 4 World Trade Center, 150 Greenwich Street, 62nd Floor, New York, New York 10007, USA. The Notice must (1) describe the nature and basis of the claim or dispute; and (2) set forth the specific relief sought ("Demand"). We agree to use good faith efforts to resolve the claim directly, but if we do not reach an agreement to do so within 30 days after the Notice is received, you or Spotify may commence an arbitration proceeding. During the arbitration, the amount of any settlement offer made by you or Spotify shall not be disclosed to the arbitrator until after the arbitrator makes a final decision and award, if any. In the event our dispute is finally resolved through arbitration in your favor, and the arbitrator issues you an award that is greater than the value of Spotify's last written settlement offer, then Spotify will instead pay you either the amount of the award or $1,000, whichever is greater. All documents and information disclosed in the course of the arbitration shall be kept strictly confidential by the recipient and shall not be used by the recipient for any purpose other than for purposes of the arbitration or the enforcement of the arbitrator's decision and award and shall not be disclosed except in confidence to persons who have a need to know for such purposes or as required by applicable law.