Spaces:
Sleeping
Sleeping
Commit
·
72a7f4f
1
Parent(s):
532849a
Updated models loader and utils file
Browse files
my_agent/utils/__pycache__/models_loader.cpython-312.pyc
CHANGED
|
Binary files a/my_agent/utils/__pycache__/models_loader.cpython-312.pyc and b/my_agent/utils/__pycache__/models_loader.cpython-312.pyc differ
|
|
|
my_agent/utils/__pycache__/utils.cpython-312.pyc
CHANGED
|
Binary files a/my_agent/utils/__pycache__/utils.cpython-312.pyc and b/my_agent/utils/__pycache__/utils.cpython-312.pyc differ
|
|
|
my_agent/utils/models_loader.py
CHANGED
|
@@ -45,7 +45,7 @@ class HFEmbeddingAPI:
|
|
| 45 |
# Instantiate your API-backed "SentenceTransformer"
|
| 46 |
ST = HFEmbeddingAPI(
|
| 47 |
api_url="https://router.huggingface.co/hf-inference/models/mixedbread-ai/mxbai-embed-large-v1/pipeline/feature-extraction",
|
| 48 |
-
token="
|
| 49 |
)
|
| 50 |
|
| 51 |
|
|
|
|
| 45 |
# Instantiate your API-backed "SentenceTransformer"
|
| 46 |
ST = HFEmbeddingAPI(
|
| 47 |
api_url="https://router.huggingface.co/hf-inference/models/mixedbread-ai/mxbai-embed-large-v1/pipeline/feature-extraction",
|
| 48 |
+
token=os.environ.get("HUGGINGFACEHUB_ACCESS_TOKEN")
|
| 49 |
)
|
| 50 |
|
| 51 |
|
my_agent/utils/utils.py
CHANGED
|
@@ -8,6 +8,7 @@ from io import BytesIO
|
|
| 8 |
from fastapi import UploadFile
|
| 9 |
from huggingface_hub import InferenceClient
|
| 10 |
from .prompts import story_to_prompt , final_story_prompt
|
|
|
|
| 11 |
|
| 12 |
def generate_final_story(final_state):
|
| 13 |
if len(final_state['preferred_topics'])>0:
|
|
@@ -59,7 +60,7 @@ def generate_image(final_story):
|
|
| 59 |
|
| 60 |
client = InferenceClient(
|
| 61 |
provider="hf-inference",
|
| 62 |
-
api_key="
|
| 63 |
)
|
| 64 |
|
| 65 |
print('************Finished calling generator****************')
|
|
|
|
| 8 |
from fastapi import UploadFile
|
| 9 |
from huggingface_hub import InferenceClient
|
| 10 |
from .prompts import story_to_prompt , final_story_prompt
|
| 11 |
+
import os
|
| 12 |
|
| 13 |
def generate_final_story(final_state):
|
| 14 |
if len(final_state['preferred_topics'])>0:
|
|
|
|
| 60 |
|
| 61 |
client = InferenceClient(
|
| 62 |
provider="hf-inference",
|
| 63 |
+
api_key=os.environ.get("HUGGINGFACEHUB_ACCESS_TOKEN"),
|
| 64 |
)
|
| 65 |
|
| 66 |
print('************Finished calling generator****************')
|