Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()
|