Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,18 +16,27 @@ context_tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-mnli")
|
|
| 16 |
translation_tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-fr")
|
| 17 |
|
| 18 |
labels = [
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
]
|
| 32 |
|
| 33 |
def softmax_with_temperature(logits, temperature=1.0):
|
|
|
|
| 16 |
translation_tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-en-fr")
|
| 17 |
|
| 18 |
labels = [
|
| 19 |
+
'aerospace', 'agriculture', 'anatomy', 'anthropology', 'architecture',
|
| 20 |
+
'art', 'automotive', 'astronomy', 'aviation', 'banking',
|
| 21 |
+
'biotechnology', 'biology', 'blockchain', 'business',
|
| 22 |
+
'chemistry', 'climate change', 'communication', 'computer science',
|
| 23 |
+
'construction', 'consumer goods', 'cryptocurrency', 'cybersecurity',
|
| 24 |
+
'dance', 'diplomacy', 'ecology', 'economics',
|
| 25 |
+
'education', 'energy', 'engineering', 'entrepreneurship',
|
| 26 |
+
'entertainment', 'ethics', 'fashion', 'finance',
|
| 27 |
+
'film', 'fitness', 'food commerce', 'general',
|
| 28 |
+
'gaming', 'geography', 'geology', 'graphic design',
|
| 29 |
+
'healthcare', 'history', 'html', 'human resources',
|
| 30 |
+
'immigration', 'innovation', 'journalism',
|
| 31 |
+
'keywords','language','law enforcement','legal','logistics','literature',
|
| 32 |
+
'machine learning','management','manufacturing','mathematics','media','military',
|
| 33 |
+
'music','nanotechnology','nutrition','pharmaceuticals','photography',
|
| 34 |
+
'psychology','public health','publishing','religion','renewable energy',
|
| 35 |
+
'research','sales','science','social media','social work',
|
| 36 |
+
'space exploration','sports','statistics','supply chain',
|
| 37 |
+
'sustainability','telecommunications','transportation',
|
| 38 |
+
'urban planning','veterinary medicine','virtual reality',
|
| 39 |
+
'web development','writing','zoology'
|
| 40 |
]
|
| 41 |
|
| 42 |
def softmax_with_temperature(logits, temperature=1.0):
|