Jiahuita
commited on
Commit
·
54c3b7f
1
Parent(s):
860080f
Added url
Browse files
README.md
CHANGED
|
@@ -34,7 +34,7 @@ import requests
|
|
| 34 |
|
| 35 |
# Make a prediction
|
| 36 |
response = requests.post(
|
| 37 |
-
"https://
|
| 38 |
json={"text": "Your news headline here"}
|
| 39 |
)
|
| 40 |
print(response.json())
|
|
@@ -45,7 +45,7 @@ Or use it locally:
|
|
| 45 |
```python
|
| 46 |
from transformers import pipeline
|
| 47 |
|
| 48 |
-
classifier = pipeline("text-classification", model="
|
| 49 |
result = classifier("Your news headline here")
|
| 50 |
print(result)
|
| 51 |
```
|
|
|
|
| 34 |
|
| 35 |
# Make a prediction
|
| 36 |
response = requests.post(
|
| 37 |
+
"https://huggingface.co/Jiahuita/NewsSourceClassification/predict",
|
| 38 |
json={"text": "Your news headline here"}
|
| 39 |
)
|
| 40 |
print(response.json())
|
|
|
|
| 45 |
```python
|
| 46 |
from transformers import pipeline
|
| 47 |
|
| 48 |
+
classifier = pipeline("text-classification", model="Jiahuita/NewsSourceClassification")
|
| 49 |
result = classifier("Your news headline here")
|
| 50 |
print(result)
|
| 51 |
```
|