jacky.liu
commited on
Commit
•
16f3ebb
1
Parent(s):
0c3aef9
Add Description and Examples
Browse files
app.py
CHANGED
@@ -20,9 +20,16 @@ def predict(text):
|
|
20 |
print(f"Predictions:{predictions.item()}, Label:{predicted_label}")
|
21 |
return {"predictions": predictions.item(), "label": predicted_label}
|
22 |
|
23 |
-
def greet(name):
|
24 |
-
print("Hello " + name + "!!")
|
25 |
-
return "Hello " + name + "!!"
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
demo.launch(share=True)
|
|
|
20 |
print(f"Predictions:{predictions.item()}, Label:{predicted_label}")
|
21 |
return {"predictions": predictions.item(), "label": predicted_label}
|
22 |
|
|
|
|
|
|
|
23 |
|
24 |
+
|
25 |
+
demo = gr.Interface(fn=predict,
|
26 |
+
inputs="text",
|
27 |
+
outputs="text",
|
28 |
+
examples=[["Tiffany Doll - Wine Makes Me Anal (31.03.2018)_1080p.mp4","{'predictions': 1, 'label': 'Sexual'}"],
|
29 |
+
["DVAJ-548_CH_SD","{'predictions': 1, 'label': 'Sexual'}"],
|
30 |
+
["MILK-217-UNCENSORED-LEAKピタコス Gカップ痴女 完全着衣で濃密5PLAY 椿りか 580 2.TS","{'predictions': 1, 'label': 'Sexual'}"],],
|
31 |
+
title="Sexual Content Detection",
|
32 |
+
description="Detects sexual content in text, <a href='https://ko-fi.com/ugetai' target='_blank'>Buy me a cup of coffee</a>.",
|
33 |
+
|
34 |
+
)
|
35 |
demo.launch(share=True)
|