Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,17 @@
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
API_URL = "https://api-inference.huggingface.co/models/casehold/custom-legalbert"
|
|
@@ -13,14 +26,6 @@ output = query({
|
|
| 13 |
})
|
| 14 |
|
| 15 |
|
| 16 |
-
# Use a pipeline as a high-level helper
|
| 17 |
-
from transformers import pipeline
|
| 18 |
-
|
| 19 |
-
pipe = pipeline("fill-mask", model="casehold/custom-legalbert")
|
| 20 |
-
|
| 21 |
-
# Load model directly
|
| 22 |
-
from transformers import AutoModel
|
| 23 |
-
model = AutoModel.from_pretrained("casehold/custom-legalbert")
|
| 24 |
|
| 25 |
import gradio as gr
|
| 26 |
gr.Interface.load("models/casehold/custom-legalbert").launch()
|
|
|
|
| 1 |
|
| 2 |
+
Use a pipeline as a high-level helper
|
| 3 |
+
from transformers import pipeline
|
| 4 |
+
|
| 5 |
+
pipe = pipeline("fill-mask", model="casehold/custom-legalbert")
|
| 6 |
+
|
| 7 |
+
# Load model directly
|
| 8 |
+
from transformers import AutoModel
|
| 9 |
+
model = AutoModel.from_pretrained("casehold/custom-legalbert")
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
import requests
|
| 16 |
|
| 17 |
API_URL = "https://api-inference.huggingface.co/models/casehold/custom-legalbert"
|
|
|
|
| 26 |
})
|
| 27 |
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
import gradio as gr
|
| 31 |
gr.Interface.load("models/casehold/custom-legalbert").launch()
|