Skip to content

Commit

Permalink
[TESTS][CLEANUP]]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Apr 25, 2024
1 parent f93bc98 commit 2f88e92
Show file tree
Hide file tree
Showing 29 changed files with 304 additions and 2,940 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Unit Testing Agent_state.json
Devin_state.json
swarms/__pycache__
artifacts
transcript_generator.json
venv
.DS_Store
Cargo.lock
Expand Down
6 changes: 4 additions & 2 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
)

# Run the Agent on a task
# out = agent("Generate a transcript for a youtube video on what swarms are!")
out = agent.run("Generate a transcript for a youtube video on what swarms are!")
print(out)

# Save the state
check = agent.save_state(
"transcript_generator.json",
"Generate a transcript for a youtube video on what swarms are!",
)
print(check)
17 changes: 10 additions & 7 deletions swarms/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from swarms.models.mixtral import Mixtral # noqa: E402
from swarms.models.mpt import MPT7B # noqa: E402
from swarms.models.nougat import Nougat # noqa: E402
from swarms.models.palm import GooglePalm as Palm # noqa: E402
from swarms.models.openai_tts import OpenAITTS # noqa: E402
from swarms.models.popular_llms import (
AnthropicChat as Anthropic,
Expand Down Expand Up @@ -42,7 +43,7 @@
VideoModality,
)
from swarms.models.vilt import Vilt # noqa: E402

from swarms.models.openai_embeddings import OpenAIEmbeddings

__all__ = [
"AbstractLLM",
Expand All @@ -62,20 +63,22 @@
"Mistral",
"Mixtral",
"MPT7B",
"MultimodalData",
"Nougat",
"OpenAI",
"OpenAIChat",
"OpenAIEmbeddings",
"OpenAITTS",
"OctoAIChat",
"Palm",
"QwenVLMultiModal",
"Replicate",
"SamplingParams",
"SamplingType",
"TextModality",
"TogetherLLM",
"Vilt",
"AudioModality",
"MultimodalData",
"ImageModality",
"AudioModality",
"VideoModality",
"OctoAIChat",
]
"TogetherLLM",
"Vilt",
]
80 changes: 0 additions & 80 deletions swarms/models/gpt4_sam.py

This file was deleted.

7 changes: 1 addition & 6 deletions swarms/models/huggingface_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
from termcolor import colored

from swarms.models.base_llm import AbstractLLM

if torch.cuda.is_available():
try:
from optimum.nvidia.pipelines import pipeline
except ImportError:
from transformers.pipelines import pipeline
from transformers.pipelines import pipeline


class HuggingfacePipeline(AbstractLLM):
Expand Down
Loading

0 comments on commit 2f88e92

Please sign in to comment.