BroBro87 commited on
Commit
96b8e08
·
verified ·
1 Parent(s): e88849f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -10,7 +10,7 @@ load_dotenv()
10
 
11
  # Initialize ComposioToolSet and OpenAI LLM
12
  toolset = ComposioToolSet(api_key=os.getenv('COMPOSIO_API_KEY'))
13
- tools = toolset.get_tools(apps=[App.TWITTER])
14
 
15
  llm = OpenAI(model="gpt-4o", api_key=os.getenv('OPENAI_API_KEY'))
16
 
@@ -20,9 +20,9 @@ prefix_messages = [
20
  role="system",
21
  content=(
22
  f"""
23
- You are a TWITTER wrapped generator. Based on the TWITTER username provided, analyze the user's profile, recent tweets, and engagement data.
24
  Be extremely creative and funny about it.
25
- Create a personalized "TWITTER Wrapped" summary highlighting their top tweets, most engaging content, follower growth, and other key insights.
26
  Generate the output in a structured JSON format that can be easily parsed programmatically. Include fields that you deem necessary be creative.
27
  Use the tools you have to get the info
28
  """
@@ -42,20 +42,20 @@ agent = FunctionCallingAgentWorker(
42
 
43
  def generate_wrapped(username):
44
  """
45
- Function to generate a "TWITTER Wrapped" summary based on the TWITTER username provided by the user.
46
  """
47
- user_input = f"Create a TWITTER Wrapped summary for the username: {username}"
48
  response = agent.chat(user_input)
49
  return response
50
 
51
  # Create Gradio interface
52
  with gr.Blocks() as demo:
53
- gr.Markdown("""### TWITTER Wrapped Generator
54
- Enter a TWITTER username below to generate your personalized TWITTER Wrapped summary.
55
  """)
56
 
57
- username_input = gr.Textbox(label="TWITTER Username", placeholder="e.g., elonmusk")
58
- output = gr.Textbox(label="Output", placeholder="Your TWITTER Wrapped summary and Google Sheet link will appear here.", lines=10)
59
 
60
  generate_button = gr.Button("Generate Wrapped")
61
 
 
10
 
11
  # Initialize ComposioToolSet and OpenAI LLM
12
  toolset = ComposioToolSet(api_key=os.getenv('COMPOSIO_API_KEY'))
13
+ tools = toolset.get_tools(apps=[App.GOOGLECALENDAR])
14
 
15
  llm = OpenAI(model="gpt-4o", api_key=os.getenv('OPENAI_API_KEY'))
16
 
 
20
  role="system",
21
  content=(
22
  f"""
23
+ You are a GOOGLE CALENDAR wrapped generator. Based on the GOOGLE CALENDAR username provided, analyze the user's profile, recent tweets, and engagement data.
24
  Be extremely creative and funny about it.
25
+ Create a personalized "GOOGLE CALENDAR Wrapped" summary highlighting their key insights.
26
  Generate the output in a structured JSON format that can be easily parsed programmatically. Include fields that you deem necessary be creative.
27
  Use the tools you have to get the info
28
  """
 
42
 
43
  def generate_wrapped(username):
44
  """
45
+ Function to generate a "GOOGLE CALENDAR Wrapped" summary based on the GOOGLE CALENDAR username provided by the user.
46
  """
47
+ user_input = f"Create a GOOGLE CALENDAR Wrapped summary for the username: {username}"
48
  response = agent.chat(user_input)
49
  return response
50
 
51
  # Create Gradio interface
52
  with gr.Blocks() as demo:
53
+ gr.Markdown("""### GOOGLE CALENDAR Wrapped Generator
54
+ Enter a GOOGLE CALENDAR username below to generate your personalized GOOGLE CALENDAR Wrapped summary.
55
  """)
56
 
57
+ username_input = gr.Textbox(label="GOOGLE CALENDAR Username", placeholder="e.g., elonmusk")
58
+ output = gr.Textbox(label="Output", placeholder="Your GOOGLE CALENDAR Wrapped summary and Google Sheet link will appear here.", lines=10)
59
 
60
  generate_button = gr.Button("Generate Wrapped")
61