jjuarez commited on
Commit
3f05bd9
1 Parent(s): ddbf09b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -6,8 +6,10 @@ tokenizer = AutoTokenizer.from_pretrained("ieuniversity/sciencebrief_translation
6
  model = AutoModelForSeq2SeqLM.from_pretrained("ieuniversity/sciencebrief_translation")
7
 
8
  # Loading summarization model
9
- tokenizer = AutoTokenizer.from_pretrained("ieuniversity/sciencebrief_summarization")
10
- model = AutoModelForSeq2SeqLM.from_pretrained("ieuniversity/sciencebrief_summarization")
 
 
11
 
12
 
13
  #translation function
@@ -30,10 +32,11 @@ summarization_output = gr.outputs.Textbox(label="Summarization Output")
30
  translation_output = gr.outputs.Textbox(label="Translation Output")
31
 
32
  gr.Interface(
33
- fn=[summarize_text, translate_text],
34
  inputs=input_text,
35
  outputs=[summarization_output, translation_output],
36
  layout="vertical",
37
  title="Scientific Papers Text Summarization and Translation",
38
  description="Enter some text and get a summary and translation in Spanish."
39
  ).launch()
 
 
6
  model = AutoModelForSeq2SeqLM.from_pretrained("ieuniversity/sciencebrief_translation")
7
 
8
  # Loading summarization model
9
+
10
+ summarization_tokenizer = AutoTokenizer.from_pretrained("ieuniversity/sciencebrief_summarization")
11
+ summarization_model = AutoModelForSeq2SeqLM.from_pretrained("ieuniversity/sciencebrief_summarization")
12
+
13
 
14
 
15
  #translation function
 
32
  translation_output = gr.outputs.Textbox(label="Translation Output")
33
 
34
  gr.Interface(
35
+ fn=[summarize_text, translate],
36
  inputs=input_text,
37
  outputs=[summarization_output, translation_output],
38
  layout="vertical",
39
  title="Scientific Papers Text Summarization and Translation",
40
  description="Enter some text and get a summary and translation in Spanish."
41
  ).launch()
42
+