faizaaska517 commited on
Commit
07216f5
·
verified ·
1 Parent(s): 2a62921

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- return f"An error occurred: {str(e)}"
 
 
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,