Jing997 commited on
Commit
497bf08
Β·
1 Parent(s): 8237cfe

change app name

Browse files
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Chaptly
3
  emoji: πŸš€
4
  colorFrom: red
5
  colorTo: red
 
1
  ---
2
+ title: Chaptive
3
  emoji: πŸš€
4
  colorFrom: red
5
  colorTo: red
app.py CHANGED
@@ -13,7 +13,7 @@ from pages import about_page, contact_page, home_page
13
 
14
  def main():
15
  st.set_page_config(
16
- page_title="Chaptly (YouTube Tutor Chatbot)",
17
  page_icon="πŸ“š",
18
  layout="wide",
19
  initial_sidebar_state="expanded",
 
13
 
14
  def main():
15
  st.set_page_config(
16
+ page_title="Chaptive (YouTube Tutor Chatbot)",
17
  page_icon="πŸ“š",
18
  layout="wide",
19
  initial_sidebar_state="expanded",
huggingface-metadata.yaml CHANGED
@@ -1,5 +1,5 @@
1
  # File: .github/huggingface-metadata.yaml
2
- title: Chaptly AI
3
  emoji: πŸ“•
4
  colorFrom: indigo
5
  colorTo: blue
 
1
  # File: .github/huggingface-metadata.yaml
2
+ title: Chaptive AI
3
  emoji: πŸ“•
4
  colorFrom: indigo
5
  colorTo: blue
scripts/create_iam_role.py CHANGED
@@ -1,7 +1,7 @@
1
  """Utility script to provision S3 read-only credentials for the Streamlit app.
2
 
3
  This helper creates (or reuses) an IAM user and optional role that have
4
- `s3:ListBucket` / `s3:GetObject` access to the `chaptly-rag` bucket. It then
5
  prints the access key and secret so they can be set as environment variables for the Streamlit app.
6
 
7
  Usage:
@@ -9,7 +9,7 @@ Usage:
9
  ```bash
10
  python streamlit/scripts/create_iam_role.py \
11
  --entity-name streamlit-cache-reader \
12
- --bucket chaptly-rag
13
  ```
14
 
15
  The AWS account credentials used to run this script must already have IAM
@@ -96,7 +96,7 @@ def ensure_role(iam, role_name: str, bucket: str, assume_policy: Dict[str, Any])
96
  def parse_args() -> argparse.Namespace:
97
  parser = argparse.ArgumentParser(description="Provision S3 read-only IAM credentials for Streamlit.")
98
  parser.add_argument("--entity-name", default=DEFAULT_ENTITY_NAME, help="IAM user/role name to create or reuse.")
99
- parser.add_argument("--bucket", default=DEFAULT_BUCKET, help="S3 bucket name (default: chaptly-rag).")
100
  parser.add_argument(
101
  "--create-role",
102
  action="store_true",
@@ -120,7 +120,7 @@ def main() -> None:
120
  for key, value in credentials.items():
121
  print(f"{key} = {value}")
122
  print("AWS_REGION = ap-southeast-1")
123
- print(f"CHAPTLY_S3_BUCKET = {args.bucket}")
124
 
125
  if args.create_role:
126
  if not args.role_trust:
 
1
  """Utility script to provision S3 read-only credentials for the Streamlit app.
2
 
3
  This helper creates (or reuses) an IAM user and optional role that have
4
+ `s3:ListBucket` / `s3:GetObject` access to the `chaptive-rag` bucket. It then
5
  prints the access key and secret so they can be set as environment variables for the Streamlit app.
6
 
7
  Usage:
 
9
  ```bash
10
  python streamlit/scripts/create_iam_role.py \
11
  --entity-name streamlit-cache-reader \
12
+ --bucket chaptive-rag
13
  ```
14
 
15
  The AWS account credentials used to run this script must already have IAM
 
96
  def parse_args() -> argparse.Namespace:
97
  parser = argparse.ArgumentParser(description="Provision S3 read-only IAM credentials for Streamlit.")
98
  parser.add_argument("--entity-name", default=DEFAULT_ENTITY_NAME, help="IAM user/role name to create or reuse.")
99
+ parser.add_argument("--bucket", default=DEFAULT_BUCKET, help="S3 bucket name (default: chaptive-rag).")
100
  parser.add_argument(
101
  "--create-role",
102
  action="store_true",
 
120
  for key, value in credentials.items():
121
  print(f"{key} = {value}")
122
  print("AWS_REGION = ap-southeast-1")
123
+ print(f"CHAPTIVE_S3_BUCKET = {args.bucket}")
124
 
125
  if args.create_role:
126
  if not args.role_trust:
src/pages/_about_page.py CHANGED
@@ -4,9 +4,9 @@ from utils.helpers import get_image_base64, get_remote_image_url, resolve_image_
4
 
5
 
6
  def about_page() -> None:
7
- st.title("About Chaptly AI")
8
  st.markdown(
9
- "Chaptly is a conversational tutor that turns long-form YouTube lectures into searchable,"
10
  " grounded study sessions using Gemini, FastAPI, and a fully serverless AWS backbone."
11
  )
12
 
@@ -17,7 +17,7 @@ def about_page() -> None:
17
  st.markdown("<hr>", unsafe_allow_html=True)
18
  st.header("Project Overview")
19
  st.write(
20
- "Chaptly indexes pre-approved educational channels, downloads transcripts, chunks and embeds them,"\
21
  " then exposes bookmarks, semantic search, QA, quizzes, and summaries via a single FastAPI Lambda."\
22
  " Downstream clients (Hugging Face Space, Streamlit, CLI) interact through API Gateway using API keys"\
23
  " and strict channel whitelists."
@@ -96,8 +96,8 @@ def about_page() -> None:
96
  )
97
 
98
  st.markdown("<hr>", unsafe_allow_html=True)
99
- st.header("How Chaptly AI Transforms Your Study Experience")
100
- st.markdown("Chaptly AI is designed to help learners master complex material quickly and at scale:")
101
  feature_emojis = [
102
  "πŸš€", "πŸ”Ž", "πŸ“‘", "πŸ“", "πŸ’‘", "βœ…"
103
  ]
@@ -128,7 +128,7 @@ def about_page() -> None:
128
  st.markdown(f"{feature_emojis[i]} **{feature_titles[i]}**")
129
  st.write(feature_descriptions[i])
130
  st.markdown(
131
- "<br><b>Together, these features empower users to learn faster, retain more, and scale their study efforts across multiple subjects and lecturesβ€”making Chaptly AI a powerful tool for modern, rapid, and effective education.</b>", unsafe_allow_html=True
132
  )
133
 
134
  st.markdown("<hr>", unsafe_allow_html=True)
@@ -136,7 +136,7 @@ def about_page() -> None:
136
  st.markdown(
137
  "| Layer | Stack |\n| --- | --- |\n"
138
  "| Backend | FastAPI + Pydantic running on AWS Lambda via Mangum |\n"
139
- "| Storage | AWS S3 (artifacts + Lambda ZIP), DynamoDB (`ChaptlyJobs`), Secrets Manager |\n"
140
  "| AI | Google Gemini (text-embedding-004, 1.5 Flash) |\n"
141
  "| Infra | Terraform (S3, DynamoDB, IAM, Lambda, API Gateway, CloudWatch) |\n"
142
  "| Frontend | Streamlit & Hugging Face Space clients |"
 
4
 
5
 
6
  def about_page() -> None:
7
+ st.title("About Chaptive AI")
8
  st.markdown(
9
+ "Chaptive is a conversational tutor that turns long-form YouTube lectures into searchable,"
10
  " grounded study sessions using Gemini, FastAPI, and a fully serverless AWS backbone."
11
  )
12
 
 
17
  st.markdown("<hr>", unsafe_allow_html=True)
18
  st.header("Project Overview")
19
  st.write(
20
+ "Chaptive indexes pre-approved educational channels, downloads transcripts, chunks and embeds them,"\
21
  " then exposes bookmarks, semantic search, QA, quizzes, and summaries via a single FastAPI Lambda."\
22
  " Downstream clients (Hugging Face Space, Streamlit, CLI) interact through API Gateway using API keys"\
23
  " and strict channel whitelists."
 
96
  )
97
 
98
  st.markdown("<hr>", unsafe_allow_html=True)
99
+ st.header("How Chaptive AI Transforms Your Study Experience")
100
+ st.markdown("Chaptive AI is designed to help learners master complex material quickly and at scale:")
101
  feature_emojis = [
102
  "πŸš€", "πŸ”Ž", "πŸ“‘", "πŸ“", "πŸ’‘", "βœ…"
103
  ]
 
128
  st.markdown(f"{feature_emojis[i]} **{feature_titles[i]}**")
129
  st.write(feature_descriptions[i])
130
  st.markdown(
131
+ "<br><b>Together, these features empower users to learn faster, retain more, and scale their study efforts across multiple subjects and lecturesβ€”making Chaptive AI a powerful tool for modern, rapid, and effective education.</b>", unsafe_allow_html=True
132
  )
133
 
134
  st.markdown("<hr>", unsafe_allow_html=True)
 
136
  st.markdown(
137
  "| Layer | Stack |\n| --- | --- |\n"
138
  "| Backend | FastAPI + Pydantic running on AWS Lambda via Mangum |\n"
139
+ "| Storage | AWS S3 (artifacts + Lambda ZIP), DynamoDB (`ChaptiveJobs`), Secrets Manager |\n"
140
  "| AI | Google Gemini (text-embedding-004, 1.5 Flash) |\n"
141
  "| Infra | Terraform (S3, DynamoDB, IAM, Lambda, API Gateway, CloudWatch) |\n"
142
  "| Frontend | Streamlit & Hugging Face Space clients |"
src/pages/_contact_page.py CHANGED
@@ -4,7 +4,7 @@ import streamlit as st
4
  def contact_page() -> None:
5
  st.title("Contact & Support")
6
  st.markdown(
7
- "Have a question about Chaptly AI, need help onboarding the API, or want to contribute? "
8
  "Reach out through the channels below."
9
  )
10
 
@@ -15,14 +15,14 @@ def contact_page() -> None:
15
  st.markdown("<hr>", unsafe_allow_html=True)
16
  st.header("GitHub & Issues")
17
  st.markdown(
18
- "- Source: [Github Repository](https://github.com/Jhwong19/chaptly-ai-public)\n"
19
  "- Please open GitHub Issues for bug reports, feature requests, or deployment questions."
20
  )
21
 
22
  st.markdown("<hr>", unsafe_allow_html=True)
23
  st.header("License")
24
  st.markdown(
25
- "Chaptly AI ships under the MIT License. You are free to fork, adapt, and deploy, provided the license"
26
  " notice remains intact. See the repository `LICENSE` file for full terms."
27
  )
28
 
 
4
  def contact_page() -> None:
5
  st.title("Contact & Support")
6
  st.markdown(
7
+ "Have a question about Chaptive AI, need help onboarding the API, or want to contribute? "
8
  "Reach out through the channels below."
9
  )
10
 
 
15
  st.markdown("<hr>", unsafe_allow_html=True)
16
  st.header("GitHub & Issues")
17
  st.markdown(
18
+ "- Source: [Github Repository](https://github.com/Jhwong19/chaptive-ai-public)\n"
19
  "- Please open GitHub Issues for bug reports, feature requests, or deployment questions."
20
  )
21
 
22
  st.markdown("<hr>", unsafe_allow_html=True)
23
  st.header("License")
24
  st.markdown(
25
+ "Chaptive AI ships under the MIT License. You are free to fork, adapt, and deploy, provided the license"
26
  " notice remains intact. See the repository `LICENSE` file for full terms."
27
  )
28
 
src/pages/_home_page.py CHANGED
@@ -716,11 +716,11 @@ def home_page() -> None:
716
  st.markdown("""
717
  <div style='display: flex; align-items: center;'>
718
  <span style='font-size: 2.5rem; margin-right: 0.5rem;'>πŸ“š</span>
719
- <span style='font-size: 2.2rem; font-weight: bold;'>Chaptly AI</span>
720
  </div>
721
  """, unsafe_allow_html=True)
722
  st.markdown("<span style='font-size:1.3rem;color:#F63366;font-weight:500;'>Your AI-powered YouTube study companion</span>", unsafe_allow_html=True)
723
- st.caption("Chaptly AI: Transcribe, Summarize, Generate Bookmarks, Quizzes and Q&A.")
724
  _init_session_state()
725
  _render_sidebar_stepper()
726
  _render_api_status()
@@ -732,5 +732,5 @@ def home_page() -> None:
732
 
733
 
734
  if __name__ == "__main__":
735
- st.set_page_config(page_title="Chaptly AI", page_icon="πŸ“š", layout="wide")
736
  home_page()
 
716
  st.markdown("""
717
  <div style='display: flex; align-items: center;'>
718
  <span style='font-size: 2.5rem; margin-right: 0.5rem;'>πŸ“š</span>
719
+ <span style='font-size: 2.2rem; font-weight: bold;'>Chaptive AI</span>
720
  </div>
721
  """, unsafe_allow_html=True)
722
  st.markdown("<span style='font-size:1.3rem;color:#F63366;font-weight:500;'>Your AI-powered YouTube study companion</span>", unsafe_allow_html=True)
723
+ st.caption("Chaptive AI: Transcribe, Summarize, Generate Bookmarks, Quizzes and Q&A.")
724
  _init_session_state()
725
  _render_sidebar_stepper()
726
  _render_api_status()
 
732
 
733
 
734
  if __name__ == "__main__":
735
+ st.set_page_config(page_title="Chaptive AI", page_icon="πŸ“š", layout="wide")
736
  home_page()
src/utils/settings.py CHANGED
@@ -41,7 +41,7 @@ APPROVED_CHANNEL_IDS = {
41
  "freecodecamp.org" : "UC8butISFwT-Wl7EV0hUK0BQ"
42
  }
43
 
44
- HF_SPACE_ID = os.getenv("HF_SPACE_ID", "Jing997/chaptly")
45
  HF_SPACE_BRANCH = os.getenv("HF_SPACE_BRANCH", "main")
46
  HF_ASSET_BASE_URL = os.getenv(
47
  "HF_ASSET_BASE_URL",
 
41
  "freecodecamp.org" : "UC8butISFwT-Wl7EV0hUK0BQ"
42
  }
43
 
44
+ HF_SPACE_ID = os.getenv("HF_SPACE_ID", "Jing997/chaptive")
45
  HF_SPACE_BRANCH = os.getenv("HF_SPACE_BRANCH", "main")
46
  HF_ASSET_BASE_URL = os.getenv(
47
  "HF_ASSET_BASE_URL",