AI-Spock commited on
Commit
1a3c90a
1 Parent(s): 126e43b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -1,3 +1,15 @@
1
- import gradio as gr
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  gr.Interface.load("models/casehold/custom-legalbert").launch()
 
 
1
 
2
+
3
+
4
+
5
+ # Use a pipeline as a high-level helper
6
+ from transformers import pipeline
7
+
8
+ pipe = pipeline("fill-mask", model="casehold/custom-legalbert")
9
+
10
+ # Load model directly
11
+ from transformers import AutoModel
12
+ model = AutoModel.from_pretrained("casehold/custom-legalbert")
13
+
14
+ import gradio as gr
15
  gr.Interface.load("models/casehold/custom-legalbert").launch()