Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,15 +16,18 @@ 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 |
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", "anatomy", "anthropology", "art",
|
| 20 |
+
"automotive", "blockchain", "biology", "chemistry",
|
| 21 |
+
"cryptocurrency", "data science", "design", "e-commerce",
|
| 22 |
+
"education", "engineering", "entertainment", "environment",
|
| 23 |
+
"fashion", "finance", "food commerce", "general",
|
| 24 |
+
"gaming", "healthcare", "history", "html",
|
| 25 |
+
"information technology", "IT", "keywords", "legal",
|
| 26 |
+
"literature", "machine learning", "marketing", "medicine",
|
| 27 |
+
"music", "personal development", "philosophy", "physics",
|
| 28 |
+
"politics", "poetry", "programming", "real estate", "retail",
|
| 29 |
+
"robotics", "slang", "social media", "sports", "sustained",
|
| 30 |
+
"technical", "theater", "tourism", "travel"
|
| 31 |
]
|
| 32 |
|
| 33 |
def softmax_with_temperature(logits, temperature=1.0):
|