Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
-
import
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
# Initialize the hugging face inference api client
|
| 5 |
client = InferenceClient(
|
| 6 |
-
|
| 7 |
-
api_key="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"
|
| 8 |
)
|
| 9 |
|
| 10 |
# Define the function to generate stories or poems
|
|
|
|
| 1 |
+
import os
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
# Initialize the hugging face inference api client
|
| 5 |
client = InferenceClient(
|
| 6 |
+
api_key=os.environ.get("HF_API_TOKEN")
|
|
|
|
| 7 |
)
|
| 8 |
|
| 9 |
# Define the function to generate stories or poems
|