Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
-
pipeline_en = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-qa-detector-distil",use_auth_token=
|
6 |
# pipeline_en = pipeline_zh
|
7 |
# pipeline_zh = pipeline(task="text2text-generation", model="beyond/genius-base-chinese")
|
8 |
|
@@ -25,7 +25,7 @@ with gr.Blocks() as demo:
|
|
25 |
""")
|
26 |
with gr.Tab("English"):
|
27 |
q1 = gr.Textbox(lines=2, label='Question',value="What stops a restaurant from noting down my credit card info and using it ? No offense to restaurants . Can be generalized to anyone who I give my credit card info to . Explain like I'm five.")
|
28 |
-
a1 = gr.Textbox(lines=5, label='Answer',value="There are a few things that can help protect your credit card information from being misused when you give it to a restaurant or any other business")
|
29 |
label = gr.Textbox(lines=1, label='Predicted Label π')
|
30 |
score = gr.Textbox(lines=1, label='Prob')
|
31 |
button1 = gr.Button("π€ Predict!")
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
|
5 |
+
pipeline_en = pipeline(task="text-classification", model="Hello-SimpleAI/chatgpt-qa-detector-distil",use_auth_token=access_token)
|
6 |
# pipeline_en = pipeline_zh
|
7 |
# pipeline_zh = pipeline(task="text2text-generation", model="beyond/genius-base-chinese")
|
8 |
|
|
|
25 |
""")
|
26 |
with gr.Tab("English"):
|
27 |
q1 = gr.Textbox(lines=2, label='Question',value="What stops a restaurant from noting down my credit card info and using it ? No offense to restaurants . Can be generalized to anyone who I give my credit card info to . Explain like I'm five.")
|
28 |
+
a1 = gr.Textbox(lines=5, label='Answer',value="There are a few things that can help protect your credit card information from being misused when you give it to a restaurant or any other business:\n\nEncryption: Many businesses use encryption to protect your credit card information when it is being transmitted or stored. This means that the information is transformed into a code that is difficult for anyone to read without the right key.")
|
29 |
label = gr.Textbox(lines=1, label='Predicted Label π')
|
30 |
score = gr.Textbox(lines=1, label='Prob')
|
31 |
button1 = gr.Button("π€ Predict!")
|