Daniel-FD commited on
Commit
f1d11f4
·
1 Parent(s): 7a5c2c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -16,14 +16,21 @@ def sar_alert(MESSAGE, API_KEY):
16
  #
17
  pprint.pprint(output_data)
18
  df_response = pd.json_normalize(output_data)
19
- df_response = df_response['output.SAR_requested', 'output.explanation']
20
  return df_response, str(output_data)
21
 
22
  iface = gr.Interface(
23
  fn=sar_alert,
24
- inputs=["text", "text"],
25
- outputs=[gr.outputs.Dataframe(headers=['SAR_Requested', 'Explanation'], type='pandas'),
26
- "text"]
 
 
 
 
 
 
 
27
  )
28
 
29
  iface.launch()
 
16
  #
17
  pprint.pprint(output_data)
18
  df_response = pd.json_normalize(output_data)
19
+ df_response = df_response[['output.SAR_requested', 'output.explanation']]
20
  return df_response, str(output_data)
21
 
22
  iface = gr.Interface(
23
  fn=sar_alert,
24
+ inputs=[
25
+ "text",
26
+ "text"],
27
+ outputs=[
28
+ gr.outputs.Dataframe(headers=['SAR_Requested', 'Explanation'], type='pandas'),
29
+ "text"],
30
+ examples=[
31
+ ["Customer is asking about his data, and he is concerned about GDPR because he heard about it in the news", "Private Key"],
32
+ ["Hey Kate, save $50 when you spend $150 or more. Today only! Click here to see our new products (link)", "Private Key"]],
33
+ description = "Subject Access Request from Text: Identification Algorithm"
34
  )
35
 
36
  iface.launch()