manuelcozar55 commited on
Commit
99b5108
1 Parent(s): 3f3450a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -104,7 +104,7 @@ Ensure that the translation is accurate and preserves the original meaning of th
104
  formatted_prompt = prompt.format(TEXT=text, LANGUAGE=target_language)
105
  translated_text = llm_engine_hf.invoke(formatted_prompt)
106
 
107
- return translated_text.content
108
 
109
  def process_file(file, action, target_language=None):
110
  if action == "Resumen":
@@ -168,7 +168,7 @@ with gr.Blocks() as demo:
168
  download_button = gr.Button("Descargar Resultado")
169
  download_button.click(
170
  fn=generate_file,
171
- inputs=[],
172
  outputs=gr.File()
173
  )
174
 
 
104
  formatted_prompt = prompt.format(TEXT=text, LANGUAGE=target_language)
105
  translated_text = llm_engine_hf.invoke(formatted_prompt)
106
 
107
+ return translated_text
108
 
109
  def process_file(file, action, target_language=None):
110
  if action == "Resumen":
 
168
  download_button = gr.Button("Descargar Resultado")
169
  download_button.click(
170
  fn=generate_file,
171
+ inputs=[output_text],
172
  outputs=gr.File()
173
  )
174