Frenchizer commited on
Commit
a11ae53
·
verified ·
1 Parent(s): 11c10f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -50,9 +50,9 @@ def preprocess_and_forward(text: str):
50
  client = Client("Frenchizer/space_17")
51
  try:
52
  translation = client.predict(original_text)
53
- return [translation, preprocessing_result]
54
  except Exception as e:
55
- return [f"Error: {str(e)}", preprocessing_result]
56
 
57
  # Gradio interface
58
  with gr.Blocks() as demo:
@@ -62,4 +62,4 @@ with gr.Blocks() as demo:
62
  preprocess_button.click(fn=preprocess_and_forward, inputs=[input_text], outputs=[output_text])
63
 
64
  if __name__ == "__main__":
65
- demo.launch()
 
50
  client = Client("Frenchizer/space_17")
51
  try:
52
  translation = client.predict(original_text)
53
+ return translation, preprocessing_result
54
  except Exception as e:
55
+ return f"Error: {str(e)}", preprocessing_result
56
 
57
  # Gradio interface
58
  with gr.Blocks() as demo:
 
62
  preprocess_button.click(fn=preprocess_and_forward, inputs=[input_text], outputs=[output_text])
63
 
64
  if __name__ == "__main__":
65
+ demo.launch()