jslin09's picture
Update app.py
2e11170
raw
history blame
1.16 kB
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()