Upload example.py with huggingface_hub
Browse files- example.py +6 -0
example.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Malawi Financial Assistant
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
model = pipeline("text-generation", model="Nellissa/Malawi-Financial-model")
|
| 5 |
+
response = model("Financial advice for Malawi: How to save money?")
|
| 6 |
+
print(response[0]['generated_text'])
|