subashpoudel commited on
Commit
6207d09
·
1 Parent(s): 46178b9

Saved ideas to csv

Browse files
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
.gitignore CHANGED
@@ -2,4 +2,5 @@
2
  myenv
3
  *.pyc
4
  __pycache__/
5
- logs
 
 
2
  myenv
3
  *.pyc
4
  __pycache__/
5
+ logs
6
+ src/genai/utils/data/ideas.csv
logs/access.log CHANGED
@@ -636,3 +636,22 @@
636
  2025-08-31 12:48:10,238 | INFO | access_logger | api/main.py:21 | Response status: 200
637
  2025-08-31 12:53:56,732 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
638
  2025-08-31 12:54:47,885 | INFO | access_logger | api/main.py:21 | Response status: 200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636
  2025-08-31 12:48:10,238 | INFO | access_logger | api/main.py:21 | Response status: 200
637
  2025-08-31 12:53:56,732 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
638
  2025-08-31 12:54:47,885 | INFO | access_logger | api/main.py:21 | Response status: 200
639
+ 2025-09-01 12:28:34,880 | INFO | access_logger | api/main.py:19 | Request: GET http://127.0.0.1:8000/
640
+ 2025-09-01 12:28:34,880 | INFO | access_logger | api/main.py:21 | Response status: 200
641
+ 2025-09-01 12:28:35,416 | INFO | access_logger | api/main.py:19 | Request: GET http://127.0.0.1:8000/favicon.ico
642
+ 2025-09-01 12:28:35,416 | INFO | access_logger | api/main.py:21 | Response status: 404
643
+ 2025-09-01 12:28:40,261 | INFO | access_logger | api/main.py:19 | Request: GET http://127.0.0.1:8000/docs
644
+ 2025-09-01 12:28:40,262 | INFO | access_logger | api/main.py:21 | Response status: 200
645
+ 2025-09-01 12:28:40,692 | INFO | access_logger | api/main.py:19 | Request: GET http://127.0.0.1:8000/openapi.json
646
+ 2025-09-01 12:28:40,695 | INFO | access_logger | api/main.py:21 | Response status: 200
647
+ 2025-09-01 12:28:47,400 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
648
+ 2025-09-01 12:29:44,101 | INFO | access_logger | api/main.py:21 | Response status: 200
649
+ 2025-09-01 13:54:19,094 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
650
+ 2025-09-01 13:55:06,076 | INFO | access_logger | api/main.py:21 | Response status: 200
651
+ 2025-09-01 14:22:06,833 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
652
+ 2025-09-01 14:22:37,518 | INFO | access_logger | api/main.py:21 | Response status: 200
653
+ 2025-09-01 14:23:51,035 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
654
+ 2025-09-01 14:24:24,483 | INFO | access_logger | api/main.py:21 | Response status: 200
655
+ 2025-09-01 14:56:55,852 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
656
+ 2025-09-01 14:57:54,173 | INFO | access_logger | api/main.py:19 | Request: POST http://127.0.0.1:8000/api/ideation
657
+ 2025-09-01 14:58:32,025 | INFO | access_logger | api/main.py:21 | Response status: 200
logs/app.log CHANGED
@@ -93,3 +93,8 @@
93
  2025-08-31 12:41:20,909 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
94
  2025-08-31 12:48:10,237 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
95
  2025-08-31 12:54:47,884 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
 
 
 
 
 
 
93
  2025-08-31 12:41:20,909 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
94
  2025-08-31 12:48:10,237 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
95
  2025-08-31 12:54:47,884 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
96
+ 2025-09-01 12:29:44,100 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
97
+ 2025-09-01 13:55:06,075 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
98
+ 2025-09-01 14:22:37,516 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
99
+ 2025-09-01 14:24:24,482 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
100
+ 2025-09-01 14:58:32,025 | INFO | app_logger | api/routers/ideation.py:27 | Executed the ideation pipeline.
src/.DS_Store ADDED
Binary file (6.15 kB). View file
 
src/genai/.DS_Store ADDED
Binary file (6.15 kB). View file
 
src/genai/ideation_agent/utils/nodes.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from .state import State , ValidationFormatter , CriticResponseFormatter
2
  from .tools import Retrieval
3
  from langgraph.prebuilt import create_react_agent
@@ -33,6 +34,12 @@ class IdeatorNode:
33
  response = self.llm.invoke(messages)
34
  print('Ideator Response:', response.content)
35
  state.ideator_response.append(str(response.content))
 
 
 
 
 
 
36
  print('Ideator Node executed')
37
  return state
38
 
 
1
+ import pandas as pd
2
  from .state import State , ValidationFormatter , CriticResponseFormatter
3
  from .tools import Retrieval
4
  from langgraph.prebuilt import create_react_agent
 
34
  response = self.llm.invoke(messages)
35
  print('Ideator Response:', response.content)
36
  state.ideator_response.append(str(response.content))
37
+ df = pd.read_csv('src/genai/utils/data/ideas.csv')
38
+ df = pd.concat([df, pd.DataFrame({
39
+ 'BusinessDetails': [state.business_details[-1]],
40
+ 'Ideas': [state.ideator_response[-1]]
41
+ })], ignore_index=True)
42
+ df.to_csv('src/genai/utils/data/ideas.csv')
43
  print('Ideator Node executed')
44
  return state
45
 
src/genai/ideation_agent/utils/prompts.py CHANGED
@@ -1,13 +1,13 @@
1
  def ideator_prompt_v3():
2
  return f"""
3
- You are Ideasmith Pro, a world-class video ideator trusted by top brands to craft crisp, simple, and high-impact short-form video concepts for TikTok, Instagram, and YouTube Shorts.
4
- Your task is to create exactly 8 unique and highly creative video ideas (conceptual seeds, not full scripts). Each idea should be short, clear and visually vivid.
5
- I am working on a project where i have to give very unique, creative and feasible video ideas for tiktok and instagram reels to the nepali business houses by understanding their business details.
6
- The idea must have to include very unique events, surprises to make the video catchy.
7
 
8
 
9
  You will be given:
10
- - Business details (from the human message): Focus more strongly on device_used_to_create_videos and additional informations provided. The video is to be shoot using the provided device in the business details.
11
 
12
  Output Rules:
13
  - Respond in valid JSON format only.
@@ -21,9 +21,16 @@ Output Rules:
21
 
22
 
23
  Very Important Creative Guidelines:
24
- - Each idea must be completely different in plot, theme, settings, tone, characters, events and everything.
25
- - No repeating characters, locations, or flow patterns.
26
- - Use simple, clear, and engaging language. The ideas will be used by person who are average in english proficiency.
 
 
 
 
 
 
 
27
 
28
  Here is the example of what kind of ideas i want:
29
  The business details is:
@@ -41,7 +48,7 @@ idea_2:
41
  One-line_description: show how one bag works in 3 daily scenarios (work, casual, night out).
42
  Hook: “1 bag → 3 lifestyles.”
43
 
44
- I want this kind of creative ideas. The video have to be very catchy enough and include surprise factors too. Don't make idea generic. The idea have to stand out very creatively.
45
  """
46
 
47
  def critic_prompt_v3():
 
1
  def ideator_prompt_v3():
2
  return f"""
3
+ You are Ideasmith Pro, a world-class video ideator and social media content strategist, trusted by top global brands to craft crisp, simple, and high-impact short-form video concepts tailored for TikTok and Instagram Reels.
4
+ Your task is to generate exactly 8 unique, highly creative video concepts (short, impactful idea seeds rather than full scripts). Each concept must be concise, visually striking, and easy to grasp at a glance.
5
+ I am working on a project to generate unique, creative, and feasible TikTok and Instagram Reels video ideas for Nepali businesses by deeply understanding their business details.
6
+ Each idea should include unique twists or surprising elements that make the video instantly catchy and engaging.
7
 
8
 
9
  You will be given:
10
+ Business details (from the human message): Pay special attention to the device_used_to_create_videos and any additional_details provided. All video ideas must be designed to be filmed using the specified device.
11
 
12
  Output Rules:
13
  - Respond in valid JSON format only.
 
21
 
22
 
23
  Very Important Creative Guidelines:
24
+ - Simple filming → All ideas must be easy to shoot with a phone camera, maybe with lights. No big studio setup.
25
+ - Creative & unique Every idea must feel fresh and original. Avoid boring or repeated “product showcase” ideas.
26
+ - Instant hook Each video should have a clear wow, fun, or emotional moment in the first seconds.
27
+ - Easy to read → Use very simple English, short sentences, like talking to a high school student.
28
+ - No long stories → Each idea should be just a quick, clear seed for a video concept (not a full script).
29
+ - Different themes → All 8 ideas must be different in tone, style, or action.
30
+ - Each idea must be completely distinct — differing in plot, theme, setting, tone, characters, and key events.
31
+ - Do not repeat characters, locations, or narrative flow patterns across the ideas.
32
+ - Use simple, clear, and engaging language. All ideas should be written in easy-to-understand vocabulary suitable for someone with average English proficiency.
33
+ - Output format → Always in valid JSON with 8 objects.
34
 
35
  Here is the example of what kind of ideas i want:
36
  The business details is:
 
48
  One-line_description: show how one bag works in 3 daily scenarios (work, casual, night out).
49
  Hook: “1 bag → 3 lifestyles.”
50
 
51
+ Generate creative and attention-grabbing video ideas that stand out. Each idea must include surprising elements, be far from generic, and be memorable for its originality and catchiness.
52
  """
53
 
54
  def critic_prompt_v3():
src/genai/utils/.DS_Store ADDED
Binary file (6.15 kB). View file
 
src/genai/utils/__pycache__/models_loader.cpython-313.pyc CHANGED
Binary files a/src/genai/utils/__pycache__/models_loader.cpython-313.pyc and b/src/genai/utils/__pycache__/models_loader.cpython-313.pyc differ