Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,155 Bytes
32b0450 7fc842c 081ad0c 7fc842c 081ad0c 7fc842c 2e11170 7fc842c 081ad0c 7fc842c 2e11170 081ad0c 2e11170 081ad0c 2949981 7fc842c 081ad0c 7fc842c 081ad0c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import gradio as gr
title = "Legal Document Drafting"
drafting_examples = [
["闕很大明知金融帳戶之存摺、提款卡及密碼係供自己使用之重要理財工具,"],
["森上梅前明知其無資力支付酒店消費,亦無付款意願,竟意圖為自己不法之所有,"]
]
def greet(name):
return drafting_examples[1]
dreating_demo = gr.Interface.load(
"huggingface/jslin09/bloom-560m-finetuned-fraud",
fn=greet
title=None,
examples=drafting_examples,
inputs=gr.Textbox(
label="Text 1",
info="Initial text",
lines=3,
value=drafting_examples[1],
),
outputs="text",
description="Give me something to say!",
)
stt_demo = gr.Interface.load(
"huggingface/jslin09/bloom-560m-finetuned-fraud",
title=None,
inputs="森上梅前明知其無資力支付酒店消費,亦無付款意願,竟意圖為自己不法之所有,",
description="Let me try to guess what you're saying!",
)
demo = gr.TabbedInterface([dreating_demo, stt_demo], ["Verdicts Drafting", "Speech-to-text"])
if __name__ == "__main__":
demo.launch()
|