Spaces:
Runtime error
Runtime error
Download src/agents/linkedin_post_agent.py from Samagra07/LinkedIn_Post_Generator: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/spaces/Samagra07/LinkedIn_Post_Generator/resolve/main/src/agents/linkedin_post_agent.py
- Command line
-
hf download hf://spaces/Samagra07/LinkedIn_Post_Generator/src/agents/linkedin_post_agent.py
-
curl -L -o linkedin_post_agent.py https://huggingface.co/spaces/Samagra07/LinkedIn_Post_Generator/resolve/main/src/agents/linkedin_post_agent.py
736 Bytes
| import os | |
| from crewai import Agent | |
| from dotenv import load_dotenv | |
| from crewai_tools import SerperDevTool | |
| from langchain_together import ChatTogether | |
| load_dotenv() | |
| os.environ['SERPER_API_KEY'] = os.getenv("SERPER_API_KEY") | |
| os.environ['OPENAI_API_KEY'] = os.getenv("OPENAI_API_KEY") | |
| llm = ChatTogether( | |
| model=os.getenv("MODEL_NAME") | |
| ) | |
| tools = SerperDevTool() | |
| linkedin_post_agent = Agent( | |
| role="LinkedIn Post Creator", | |
| goal="Create a concise LinkedIn post summary from the transcription provided by the Topic Researcher.", | |
| backstory="Expert in crafting enagaging LinkedIn posts that summarizes complex topics and include trending hastags for maximum visibility.", | |
| tools=[tools], | |
| llm=llm, | |
| ) |