Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,11 @@ from transformers import pipeline
|
|
| 4 |
## create a new FASTAPI app instance
|
| 5 |
app=FastAPI()
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Initialize the text generation pipeline
|
| 8 |
pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-3.1-8B-Instruct")
|
| 9 |
|
|
|
|
| 4 |
## create a new FASTAPI app instance
|
| 5 |
app=FastAPI()
|
| 6 |
|
| 7 |
+
import os
|
| 8 |
+
|
| 9 |
+
api_key = os.getenv("HF_API_KEY")
|
| 10 |
+
|
| 11 |
+
|
| 12 |
# Initialize the text generation pipeline
|
| 13 |
pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-3.1-8B-Instruct")
|
| 14 |
|