Update app.py
Browse files
app.py
CHANGED
|
@@ -21,6 +21,9 @@ summarization_models = {
|
|
| 21 |
'Literature': "t5-small"
|
| 22 |
}
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
# Initialize translation pipeline
|
| 25 |
def get_translator(language):
|
| 26 |
model_name = translation_models.get(language)
|
|
@@ -119,3 +122,4 @@ iface.launch()
|
|
| 119 |
|
| 120 |
|
| 121 |
|
|
|
|
|
|
| 21 |
'Literature': "t5-small"
|
| 22 |
}
|
| 23 |
|
| 24 |
+
# Initialize tokenizer
|
| 25 |
+
tokenizer = AutoTokenizer.from_pretrained("t5-small") # Using t5-small tokenizer for all models
|
| 26 |
+
|
| 27 |
# Initialize translation pipeline
|
| 28 |
def get_translator(language):
|
| 29 |
model_name = translation_models.get(language)
|
|
|
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
+
|