Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,10 +34,13 @@ attack = TextFoolerJin2019.build(model_wrapper)
|
|
34 |
|
35 |
# Format the output
|
36 |
output = f"TextAttack Results:\n{attack_info}\nSkipped Details:\n{skipped_info}"
|
|
|
37 |
return output
|
38 |
|
39 |
except Exception as e:
|
40 |
-
|
|
|
|
|
41 |
|
42 |
# Gradio UI
|
43 |
gr.Interface(fn=run_attack,
|
|
|
34 |
|
35 |
# Format the output
|
36 |
output = f"TextAttack Results:\n{attack_info}\nSkipped Details:\n{skipped_info}"
|
37 |
+
print(output) # Debugging
|
38 |
return output
|
39 |
|
40 |
except Exception as e:
|
41 |
+
error_message = f"An error occurred: {str(e)}"
|
42 |
+
print(error_message) # Debugging
|
43 |
+
return error_message
|
44 |
|
45 |
# Gradio UI
|
46 |
gr.Interface(fn=run_attack,
|