coeuslearning
commited on
Commit
•
73565c8
1
Parent(s):
01fb74e
Update app.py
Browse files
app.py
CHANGED
@@ -95,12 +95,13 @@ def mask_with_protecto(text_for_prompt):
|
|
95 |
# Parse the masked result from the API response and format it for display
|
96 |
masked_result = response.json()
|
97 |
final_result = json.dumps(masked_result, indent=4)
|
98 |
-
|
99 |
-
return(masked_result)
|
100 |
else:
|
101 |
# Return an error message if the API request was not successful.
|
102 |
return(str(response.status_code))
|
103 |
|
|
|
|
|
104 |
chat_interface = gr.ChatInterface(
|
105 |
fn=generate,
|
106 |
additional_inputs=[
|
|
|
95 |
# Parse the masked result from the API response and format it for display
|
96 |
masked_result = response.json()
|
97 |
final_result = json.dumps(masked_result, indent=4)
|
98 |
+
return(masked_result["data"][0]["token_value"])
|
|
|
99 |
else:
|
100 |
# Return an error message if the API request was not successful.
|
101 |
return(str(response.status_code))
|
102 |
|
103 |
+
|
104 |
+
|
105 |
chat_interface = gr.ChatInterface(
|
106 |
fn=generate,
|
107 |
additional_inputs=[
|