Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
54 |
except Exception as e:
|
55 |
-
return
|
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()
|