Spaces:
Sleeping
Sleeping
cosmetic fixes
Browse files
app.py
CHANGED
|
@@ -2,9 +2,6 @@ import gradio as gr
|
|
| 2 |
from pangea.services import Redact
|
| 3 |
import openai
|
| 4 |
|
| 5 |
-
def greet(name):
|
| 6 |
-
return "Hello " + name + "!!"
|
| 7 |
-
|
| 8 |
def redact_input(input: str, pangea_token: str):
|
| 9 |
redact = Redact(token=pangea_token)
|
| 10 |
return redact.redact(text=input).result.redacted_text
|
|
@@ -38,7 +35,7 @@ iface = gr.Interface(
|
|
| 38 |
outputs=[output_text1, output_text2],
|
| 39 |
title="GPT-3 Input Redaction Playground",
|
| 40 |
description="<center>Enter your OpenAI key and your Pangea redact token, then put in your prompt and watch the magic happen 🪄. <br/>\
|
| 41 |
-
To learn about
|
| 42 |
allow_flagging="never"
|
| 43 |
)
|
| 44 |
iface.launch(
|
|
|
|
| 2 |
from pangea.services import Redact
|
| 3 |
import openai
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
def redact_input(input: str, pangea_token: str):
|
| 6 |
redact = Redact(token=pangea_token)
|
| 7 |
return redact.redact(text=input).result.redacted_text
|
|
|
|
| 35 |
outputs=[output_text1, output_text2],
|
| 36 |
title="GPT-3 Input Redaction Playground",
|
| 37 |
description="<center>Enter your OpenAI key and your Pangea redact token, then put in your prompt and watch the magic happen 🪄. <br/>\
|
| 38 |
+
Data redaction is powered by <a href=\"https://pangea.cloud/?utm_source=huggingface&utm_medium=redact-gpt-prompt-demo\">Pangea's APIs</a> in this demo. To learn more about how to get your API keys and tokens to run this, watch this short <a href=\"https://www.youtube.com/watch?v=LNN5s_6G3Cc\" target=\"_blank\">walkthrough demo</a></center>",
|
| 39 |
allow_flagging="never"
|
| 40 |
)
|
| 41 |
iface.launch(
|