File size: 785 Bytes
32b0450
e713002
 
 
 
32b0450
9bf8d9f
 
32b0450
e713002
 
 
837275c
e713002
 
 
9bf8d9f
 
519271e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from transformers import pipeline

#pipe = pipeline("text-generation")
#gr.Interface.from_pipeline(pipe).launch()

API_URL = "https://api-inference.huggingface.co/models/jslin09/bloom-560m-finetuned-fraud"
headers = {"Authorization": "Bearer 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"} # Read only

description = "Legal Document Drafting with BLOOM"
api_key="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"

iface = gr.Interface.load("huggingface/jslin09/bloom-560m-finetuned-fraud",
  description=description,
  examples=[["闕很大明知金融帳戶之存摺、提款卡及密碼係供自己使用之重要理財工具,"],["森上梅前明知其無資力支付酒店消費,亦無付款意願,竟意圖為自己不法之所有,"]],
  api_key=api_key,
)

iface.launch()