codeteach commited on
Commit
9e17c04
1 Parent(s): d7f037a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -24,6 +24,9 @@ summarization_models = {
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)
@@ -123,3 +126,4 @@ iface.launch()
123
 
124
 
125
 
 
 
24
  # Initialize tokenizer
25
  tokenizer = AutoTokenizer.from_pretrained("t5-small") # Using t5-small tokenizer for all models
26
 
27
+ # Initialize summarization pipelines
28
+ summarizers = {model: pipeline("summarization", model=model) for model in summarization_models.values()}
29
+
30
  # Initialize translation pipeline
31
  def get_translator(language):
32
  model_name = translation_models.get(language)
 
126
 
127
 
128
 
129
+