rianders commited on
Commit
0ad63e8
·
verified ·
1 Parent(s): bd29fe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -1,9 +1,19 @@
1
  import streamlit as st
 
 
 
2
  import requests
3
  import hashlib
4
  from crewai import Agent, Task, Crew
5
  from langchain.tools import tool
6
 
 
 
 
 
 
 
 
7
  # Define the custom tool for checking Streamlit documentation updates
8
  @tool
9
  def check_streamlit_updates(previous_hash: str) -> str:
 
1
  import streamlit as st
2
+ from openai import OpenAI
3
+ from dotenv import load_dotenv
4
+
5
  import requests
6
  import hashlib
7
  from crewai import Agent, Task, Crew
8
  from langchain.tools import tool
9
 
10
+ # Load the OpenAI API key from the .env file
11
+ load_dotenv()
12
+
13
+ # Initialize the OpenAI client
14
+ openai_client = OpenAI(api_key=os.getenv('OPENAI_API_KEY'))
15
+
16
+
17
  # Define the custom tool for checking Streamlit documentation updates
18
  @tool
19
  def check_streamlit_updates(previous_hash: str) -> str: