akarshan11 commited on
Commit
c37794f
·
verified ·
1 Parent(s): 8aae362

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -111,7 +111,7 @@ with gr.Blocks(title="Context-Aware Translation Tool") as demo:
111
  output_text = gr.Textbox(label="Translation", lines=5, interactive=False)
112
  output_pdf = gr.File(label="Download as PDF")
113
 
114
- # Define the event with explicit types
115
  translate_button.click(
116
  fn=translate_and_save,
117
  inputs=[
@@ -122,11 +122,9 @@ with gr.Blocks(title="Context-Aware Translation Tool") as demo:
122
  outputs=[
123
  output_pdf,
124
  output_text
125
- ],
126
- _js=None # Avoid any JS overrides that might affect schema
127
  )
128
 
129
  if __name__ == "__main__":
130
- # Print Gradio version for debugging
131
  print(f"Gradio version: {gr.__version__}")
132
- demo.launch(show_error=True)
 
111
  output_text = gr.Textbox(label="Translation", lines=5, interactive=False)
112
  output_pdf = gr.File(label="Download as PDF")
113
 
114
+ # Define the event without _js
115
  translate_button.click(
116
  fn=translate_and_save,
117
  inputs=[
 
122
  outputs=[
123
  output_pdf,
124
  output_text
125
+ ]
 
126
  )
127
 
128
  if __name__ == "__main__":
 
129
  print(f"Gradio version: {gr.__version__}")
130
+ demo.launch(debug=True)