Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,9 +20,9 @@ prefix_messages = [
|
|
| 20 |
role="system",
|
| 21 |
content=(
|
| 22 |
f"""
|
| 23 |
-
You are a
|
| 24 |
Be extremely creative and funny about it.
|
| 25 |
-
Create a personalized "
|
| 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 "
|
| 46 |
"""
|
| 47 |
-
user_input = f"Create a
|
| 48 |
response = agent.chat(user_input)
|
| 49 |
return response
|
| 50 |
|
| 51 |
# Create Gradio interface
|
| 52 |
with gr.Blocks() as demo:
|
| 53 |
-
gr.Markdown("""###
|
| 54 |
-
Enter a
|
| 55 |
""")
|
| 56 |
|
| 57 |
-
username_input = gr.Textbox(label="
|
| 58 |
-
output = gr.Textbox(label="Output", placeholder="Your
|
| 59 |
|
| 60 |
generate_button = gr.Button("Generate Wrapped")
|
| 61 |
|
|
|
|
| 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 |
|
| 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 |
|