fjenett commited on
Commit
2e1747d
1 Parent(s): 2e004f5

fixed examples

Browse files
Files changed (1) hide show
  1. app.py +37 -30
app.py CHANGED
@@ -64,8 +64,22 @@ def infer(
64
 
65
 
66
  examples = [
67
- # Sentiment Analysis
68
- '''Label the tweets as either "positive", "negative", "mixed", or "neutral":
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  Tweet: I can say that there isn't anything I would change.
71
  Label: positive
@@ -80,21 +94,10 @@ Tweet: I think the background image could have been better.
80
  Label: negative
81
 
82
  Tweet: I really like it.
83
- Label: ''',
84
- # Question Answering
85
- '''Please answer the following question:
86
-
87
- Question: What is the capital of Canada?
88
- Answer: Ottawa
89
-
90
- Question: What is the currency of Switzerland?
91
- Answer: Swiss franc
92
-
93
- Question: In which country is Wisconsin located?
94
- Answer:
95
- ''',
96
- # Topic Classification
97
- '''Given a news article, classify its topic.
98
  Possible labels: 1. World 2. Sports 3. Business 4. Sci/Tech
99
 
100
  Article: A nearby star thought to harbor comets and asteroids now appears to be home to planets, too.
@@ -105,9 +108,10 @@ Label: Business
105
 
106
  Article: Murtagh a stickler for success Northeastern field hockey coach Cheryl Murtagh doesn't want the glare of the spotlight that shines on her to detract from a team that has been the America East champion for the past three years and has been to the NCAA tournament 13 times.
107
  Label:
108
- ''',
109
- # Paraphrasing
110
- '''Paraphrase the given sentence into a different sentence.
 
111
 
112
  Input: Can you recommend some upscale restaurants in New York?
113
  Output: What upscale restaurants do you recommend in New York?
@@ -117,9 +121,10 @@ Output: Recommend some of the best places to visit in Paris?
117
 
118
  Input: Could you recommend some hotels that have cheap price in Zurich?
119
  Output:
120
- ''',
121
- # Text Summarization
122
- '''Given a review from Amazon's food products, the task is to generate a short summary of the given review in the input.
 
123
 
124
  Input: I have bought several of the Vitality canned dog food products and have found them all to be of good quality. The product looks more like a stew than a processed meat and it smells better. My Labrador is finicky and she appreciates this product better than most.
125
  Output: Good Quality Dog Food
@@ -129,9 +134,10 @@ Output: Not as Advertised
129
 
130
  Input: My toddler loves this game to a point where he asks for it. That's a big thing for me. Secondly, no glitching unlike one of their competitors (PlayShifu). Any tech I don’t have to reach out to support for help is a good tech for me. I even enjoy some of the games and activities in this. Overall, this is a product that shows that the developers took their time and made sure people would not be asking for refund. I’ve become bias regarding this product and honestly I look forward to buying more of this company’s stuff. Please keep up the great work.
131
  Output:
132
- ''',
133
- # Word Sense Disambiguation
134
- '''Identify which sense of a word is meant in a given context.
 
135
 
136
  Context: The river overflowed the bank.
137
  Word: bank
@@ -148,9 +154,10 @@ Sense: commercial (finance) banks
148
  Context: Bill killed the project
149
  Word: kill
150
  Sense:
151
- ''',
152
- # Natural Language Interface
153
- '''Given a pair of sentences, choose whether the two sentences agree (entailment)/disagree (contradiction) with each other.
 
154
  Possible labels: 1. entailment 2. contradiction
155
 
156
  Sentence 1: The skier was on the edge of the ramp. Sentence 2: The skier was dressed in winter clothes.
@@ -161,7 +168,7 @@ Label: contradiction
161
 
162
  Sentence 1: Two middle-aged people stand by a golf hole. Sentence 2: A couple riding in a golf cart.
163
  Label:
164
- '''
165
  ]
166
 
167
 
 
64
 
65
 
66
  examples = [
67
+ [
68
+ # Question Answering
69
+ '''Please answer the following question:
70
+
71
+ Question: What is the capital of Canada?
72
+ Answer: Ottawa
73
+
74
+ Question: What is the currency of Switzerland?
75
+ Answer: Swiss franc
76
+
77
+ Question: In which country is Wisconsin located?
78
+ Answer:
79
+ ''', "GPT-JT-6B-v1", 5, 0.0, 40, 1.0],
80
+ [
81
+ # Sentiment Analysis
82
+ '''Label the tweets as either "positive", "negative", "mixed", or "neutral":
83
 
84
  Tweet: I can say that there isn't anything I would change.
85
  Label: positive
 
94
  Label: negative
95
 
96
  Tweet: I really like it.
97
+ Label: ''', "GPT-JT-6B-v1", 2, 0.0, 40, 1.0],
98
+ [
99
+ # Topic Classification
100
+ '''Given a news article, classify its topic.
 
 
 
 
 
 
 
 
 
 
 
101
  Possible labels: 1. World 2. Sports 3. Business 4. Sci/Tech
102
 
103
  Article: A nearby star thought to harbor comets and asteroids now appears to be home to planets, too.
 
108
 
109
  Article: Murtagh a stickler for success Northeastern field hockey coach Cheryl Murtagh doesn't want the glare of the spotlight that shines on her to detract from a team that has been the America East champion for the past three years and has been to the NCAA tournament 13 times.
110
  Label:
111
+ ''', "GPT-JT-6B-v1", 5, 0.0, 40, 1.0],
112
+ [
113
+ # Paraphrasing
114
+ '''Paraphrase the given sentence into a different sentence.
115
 
116
  Input: Can you recommend some upscale restaurants in New York?
117
  Output: What upscale restaurants do you recommend in New York?
 
121
 
122
  Input: Could you recommend some hotels that have cheap price in Zurich?
123
  Output:
124
+ ''', "GPT-JT-6B-v1", 20, 0.8, 40, 1.0],
125
+ [
126
+ # Text Summarization
127
+ '''Given a review from Amazon's food products, the task is to generate a short summary of the given review in the input.
128
 
129
  Input: I have bought several of the Vitality canned dog food products and have found them all to be of good quality. The product looks more like a stew than a processed meat and it smells better. My Labrador is finicky and she appreciates this product better than most.
130
  Output: Good Quality Dog Food
 
134
 
135
  Input: My toddler loves this game to a point where he asks for it. That's a big thing for me. Secondly, no glitching unlike one of their competitors (PlayShifu). Any tech I don’t have to reach out to support for help is a good tech for me. I even enjoy some of the games and activities in this. Overall, this is a product that shows that the developers took their time and made sure people would not be asking for refund. I’ve become bias regarding this product and honestly I look forward to buying more of this company’s stuff. Please keep up the great work.
136
  Output:
137
+ ''', "GPT-JT-6B-v1", 10, 0.0, 40, 1.0],
138
+ [
139
+ # Word Sense Disambiguation
140
+ '''Identify which sense of a word is meant in a given context.
141
 
142
  Context: The river overflowed the bank.
143
  Word: bank
 
154
  Context: Bill killed the project
155
  Word: kill
156
  Sense:
157
+ ''', "GPT-JT-6B-v1", 10, 0.0, 40, 1.0],
158
+ [
159
+ # Natural Language Interface
160
+ '''Given a pair of sentences, choose whether the two sentences agree (entailment)/disagree (contradiction) with each other.
161
  Possible labels: 1. entailment 2. contradiction
162
 
163
  Sentence 1: The skier was on the edge of the ramp. Sentence 2: The skier was dressed in winter clothes.
 
168
 
169
  Sentence 1: Two middle-aged people stand by a golf hole. Sentence 2: A couple riding in a golf cart.
170
  Label:
171
+ ''', "GPT-JT-6B-v1", 2, 0.0, 40, 1.0]
172
  ]
173
 
174