Spaces:
Build error
Build error
Delete src
Browse files- src/.DS_Store +0 -0
- src/Home.py +0 -112
- src/README.md +0 -20
- src/full_screenshot.png +0 -3
- src/get_transcripts.py +0 -25
- src/requirements.txt +0 -49
- src/streamlit_app.py +0 -40
src/.DS_Store
DELETED
|
Binary file (6.15 kB)
|
|
|
src/Home.py
DELETED
|
@@ -1,112 +0,0 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
-
from pathlib import Path
|
| 3 |
-
import json
|
| 4 |
-
import urllib.parse as ul
|
| 5 |
-
|
| 6 |
-
st.set_page_config(page_title="AutoTA | Pause. Ask. Progress.",
|
| 7 |
-
page_icon="🎓",
|
| 8 |
-
layout="centered",
|
| 9 |
-
initial_sidebar_state="collapsed",
|
| 10 |
-
)
|
| 11 |
-
|
| 12 |
-
# -------------- Dummy catalogue --------------
|
| 13 |
-
# Replace with your DB / API
|
| 14 |
-
videos = [
|
| 15 |
-
{
|
| 16 |
-
"id": "intro_algo",
|
| 17 |
-
"title": "Introduction to Algorithms and Analysis – Lec 1: Insertion Sort",
|
| 18 |
-
"summary": "An introduction to the Insertion Sort algorithm and its complexity.",
|
| 19 |
-
"url": "https://www.youtube.com/watch?v=oZgbwa8lvDE", # Corrected YouTube URL
|
| 20 |
-
"thumbnail": "https://i.ytimg.com/vi/oZgbwa8lvDE/hqdefault.jpg",
|
| 21 |
-
"video_file": "videos/oZgbwa8lvDE.mp4",
|
| 22 |
-
"transcript_file": "transcripts/oZgbwa8lvDE.csv"
|
| 23 |
-
},
|
| 24 |
-
{
|
| 25 |
-
"id": "dl_basics",
|
| 26 |
-
"title": "Deep Learning(CS7015): Lec 2.5 Perceptron Learning Algorithm",
|
| 27 |
-
"summary": "An introduction to the perceptron learning algorithm with an example.",
|
| 28 |
-
"url": "https://www.youtube.com/watch?v=VRcixOuG-TU", # Corrected YouTube URL
|
| 29 |
-
"thumbnail": "https://i.ytimg.com/vi/VRcixOuG-TU/hqdefault.jpg",
|
| 30 |
-
"video_file": "videos/VRcixOuG-TU.mp4",
|
| 31 |
-
"transcript_file": "transcripts/VRcixOuG-TU.csv"
|
| 32 |
-
},
|
| 33 |
-
{
|
| 34 |
-
"id": "python_intro",
|
| 35 |
-
"title": "Unit testing | Intro to CS - Python | Khan Academy",
|
| 36 |
-
"summary": "How do teams of programmers continuously write and revise code without breaking things? Unit tests define a function's expected behavior and then enforce that those requirements are met.",
|
| 37 |
-
"url": "https://www.youtube.com/watch?v=3OmfTIf-SOU", # Corrected YouTube URL
|
| 38 |
-
"thumbnail": "https://i.ytimg.com/vi/3OmfTIf-SOU/hqdefault.jpg",
|
| 39 |
-
"video_file": "videos/3OmfTIf-SOU.mp4",
|
| 40 |
-
"transcript_file": "transcripts/3OmfTIf-SOU.csv"
|
| 41 |
-
},
|
| 42 |
-
]
|
| 43 |
-
# Persists last timestamp per-user per-video
|
| 44 |
-
progress_store = Path(".progress.json")
|
| 45 |
-
if progress_store.exists():
|
| 46 |
-
last_pos = json.loads(progress_store.read_text())
|
| 47 |
-
else:
|
| 48 |
-
last_pos = {}
|
| 49 |
-
|
| 50 |
-
st.markdown(
|
| 51 |
-
"""
|
| 52 |
-
<style>
|
| 53 |
-
.autota-style {
|
| 54 |
-
font-family: 'Montserrat', sans-serif; /* Define Montserrat */
|
| 55 |
-
text-align: center; /* Centers the text horizontally */
|
| 56 |
-
font-size: 100px; /* Adjust the font size as desired */
|
| 57 |
-
font-weight: bold; /* Optional: make it bold */
|
| 58 |
-
color: white; /* Optional: change text color */
|
| 59 |
-
padding: 10px; /* Optional: Add some padding around the text */
|
| 60 |
-
}
|
| 61 |
-
</style>
|
| 62 |
-
<div class="autota-style">AutoTA</div>
|
| 63 |
-
""",
|
| 64 |
-
unsafe_allow_html=True
|
| 65 |
-
)
|
| 66 |
-
st.markdown(
|
| 67 |
-
"""
|
| 68 |
-
<style>
|
| 69 |
-
.center-desc {
|
| 70 |
-
font-family: 'Montserrat', sans-serif; /* Define Montserrat */
|
| 71 |
-
text-align: center; /* Centers the text horizontally */
|
| 72 |
-
font-size: 30px; /* Adjust the font size as desired */
|
| 73 |
-
font-weight: bold; /* Optional: make it bold */
|
| 74 |
-
color: #555; /* Optional: change text color */
|
| 75 |
-
padding: 10px; /* Optional: Add some padding around the text */
|
| 76 |
-
}
|
| 77 |
-
</style>
|
| 78 |
-
<div class="center-desc">A Virtual TA to interact with lecture videos</div>
|
| 79 |
-
""",
|
| 80 |
-
unsafe_allow_html=True
|
| 81 |
-
)
|
| 82 |
-
st.divider()
|
| 83 |
-
|
| 84 |
-
st.title("Video Gallery")
|
| 85 |
-
|
| 86 |
-
st.markdown("---") # Separator
|
| 87 |
-
|
| 88 |
-
for video in videos:
|
| 89 |
-
with st.container(border=True):
|
| 90 |
-
col1, col2 = st.columns([1, 3]) # Column for thumbnail, column for text
|
| 91 |
-
|
| 92 |
-
with col1:
|
| 93 |
-
# Use Streamlit's markdown to embed HTML for a clickable image link.
|
| 94 |
-
# The 'href' should point to the page name (from the 'pages' folder, without '.py').
|
| 95 |
-
# Query parameters are used to pass data (like video_id).
|
| 96 |
-
st.markdown(
|
| 97 |
-
f"""
|
| 98 |
-
<a href="/VideoViewer?video_id={video['id']}" target="_self">
|
| 99 |
-
<img src="{video['thumbnail']}" width="160" style="border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); display: block; margin: auto;">
|
| 100 |
-
</a>
|
| 101 |
-
""",
|
| 102 |
-
unsafe_allow_html=True
|
| 103 |
-
)
|
| 104 |
-
|
| 105 |
-
with col2:
|
| 106 |
-
st.subheader(video['title'])
|
| 107 |
-
st.write(video['summary'])
|
| 108 |
-
# You can also add a direct Streamlit link button for clarity
|
| 109 |
-
# This is an alternative or supplementary way to navigate
|
| 110 |
-
|
| 111 |
-
st.markdown("---") # Separator between video entries
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/README.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
| 1 |
-
# AutoTA
|
| 2 |
-
|
| 3 |
-
AutoTA is an interface for interacting with educational lecture videos.
|
| 4 |
-
|
| 5 |
-
## Installation
|
| 6 |
-
|
| 7 |
-
Install the required dependencies:
|
| 8 |
-
```bash
|
| 9 |
-
pip install -r requirements.txt
|
| 10 |
-
```
|
| 11 |
-
|
| 12 |
-
## To run locally
|
| 13 |
-
|
| 14 |
-
To run the demo locally:
|
| 15 |
-
```bash
|
| 16 |
-
streamlit run Home.py
|
| 17 |
-
```
|
| 18 |
-
## Some Additional Information
|
| 19 |
-
|
| 20 |
-
Please add your own API key to chatbot/llm_answer.py.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/full_screenshot.png
DELETED
Git LFS Details
|
src/get_transcripts.py
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
import pandas as pd
|
| 2 |
-
from youtube_transcript_api import YouTubeTranscriptApi
|
| 3 |
-
from pytube import extract
|
| 4 |
-
|
| 5 |
-
ids = ['oZgbwa8lvDE', 'VRcixOuG-TU'] # Example video IDs
|
| 6 |
-
count = 0
|
| 7 |
-
for i in range(len(ids)):
|
| 8 |
-
#url = df['video_url'][0]
|
| 9 |
-
try:
|
| 10 |
-
id = ids[i]
|
| 11 |
-
|
| 12 |
-
transcript = YouTubeTranscriptApi.get_transcript(id)
|
| 13 |
-
#print(transcript[0])
|
| 14 |
-
file_df = pd.DataFrame()
|
| 15 |
-
for j in range(len(transcript)):
|
| 16 |
-
file_df = file_df._append([dict(transcript[j])])
|
| 17 |
-
file_df.reset_index()
|
| 18 |
-
transcript_filename = str(id)+".csv"
|
| 19 |
-
file_path = "/Users/sourjyadip/Desktop/autota/transcripts/" + transcript_filename
|
| 20 |
-
file_df.to_csv(file_path)
|
| 21 |
-
print(i, " done")
|
| 22 |
-
except:
|
| 23 |
-
count += 1
|
| 24 |
-
|
| 25 |
-
print("number of skipped videos: ", count)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/requirements.txt
DELETED
|
@@ -1,49 +0,0 @@
|
|
| 1 |
-
altair==5.5.0
|
| 2 |
-
attrs==25.3.0
|
| 3 |
-
blinker==1.9.0
|
| 4 |
-
cachetools==6.1.0
|
| 5 |
-
certifi==2025.7.9
|
| 6 |
-
charset-normalizer==3.4.2
|
| 7 |
-
click==8.2.1
|
| 8 |
-
gitdb==4.0.12
|
| 9 |
-
GitPython==3.1.44
|
| 10 |
-
idna==3.10
|
| 11 |
-
Jinja2==3.1.6
|
| 12 |
-
jsonschema==4.24.0
|
| 13 |
-
jsonschema-specifications==2025.4.1
|
| 14 |
-
MarkupSafe==3.0.2
|
| 15 |
-
MouseInfo==0.1.3
|
| 16 |
-
narwhals==1.46.0
|
| 17 |
-
numpy==2.2.6
|
| 18 |
-
opencv-python==4.12.0.88
|
| 19 |
-
packaging==25.0
|
| 20 |
-
pandas==2.3.1
|
| 21 |
-
pillow==11.3.0
|
| 22 |
-
protobuf==6.31.1
|
| 23 |
-
pyarrow==20.0.0
|
| 24 |
-
PyAutoGUI==0.9.54
|
| 25 |
-
pydeck==0.9.1
|
| 26 |
-
PyGetWindow==0.0.9
|
| 27 |
-
PyMsgBox==1.0.9
|
| 28 |
-
pyobjc-core==11.1
|
| 29 |
-
pyobjc-framework-Cocoa==11.1
|
| 30 |
-
pyobjc-framework-Quartz==11.1
|
| 31 |
-
pyperclip==1.9.0
|
| 32 |
-
PyRect==0.2.0
|
| 33 |
-
PyScreeze==1.0.1
|
| 34 |
-
python-dateutil==2.9.0.post0
|
| 35 |
-
pytweening==1.2.0
|
| 36 |
-
pytz==2025.2
|
| 37 |
-
referencing==0.36.2
|
| 38 |
-
requests==2.32.4
|
| 39 |
-
rpds-py==0.26.0
|
| 40 |
-
rubicon-objc==0.5.1
|
| 41 |
-
six==1.17.0
|
| 42 |
-
smmap==5.0.2
|
| 43 |
-
streamlit==1.46.1
|
| 44 |
-
tenacity==9.1.2
|
| 45 |
-
toml==0.10.2
|
| 46 |
-
tornado==6.5.1
|
| 47 |
-
typing_extensions==4.14.1
|
| 48 |
-
tzdata==2025.2
|
| 49 |
-
urllib3==2.5.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/streamlit_app.py
DELETED
|
@@ -1,40 +0,0 @@
|
|
| 1 |
-
import altair as alt
|
| 2 |
-
import numpy as np
|
| 3 |
-
import pandas as pd
|
| 4 |
-
import streamlit as st
|
| 5 |
-
|
| 6 |
-
"""
|
| 7 |
-
# Welcome to Streamlit!
|
| 8 |
-
|
| 9 |
-
Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:.
|
| 10 |
-
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
|
| 11 |
-
forums](https://discuss.streamlit.io).
|
| 12 |
-
|
| 13 |
-
In the meantime, below is an example of what you can do with just a few lines of code:
|
| 14 |
-
"""
|
| 15 |
-
|
| 16 |
-
num_points = st.slider("Number of points in spiral", 1, 10000, 1100)
|
| 17 |
-
num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
|
| 18 |
-
|
| 19 |
-
indices = np.linspace(0, 1, num_points)
|
| 20 |
-
theta = 2 * np.pi * num_turns * indices
|
| 21 |
-
radius = indices
|
| 22 |
-
|
| 23 |
-
x = radius * np.cos(theta)
|
| 24 |
-
y = radius * np.sin(theta)
|
| 25 |
-
|
| 26 |
-
df = pd.DataFrame({
|
| 27 |
-
"x": x,
|
| 28 |
-
"y": y,
|
| 29 |
-
"idx": indices,
|
| 30 |
-
"rand": np.random.randn(num_points),
|
| 31 |
-
})
|
| 32 |
-
|
| 33 |
-
st.altair_chart(alt.Chart(df, height=700, width=700)
|
| 34 |
-
.mark_point(filled=True)
|
| 35 |
-
.encode(
|
| 36 |
-
x=alt.X("x", axis=None),
|
| 37 |
-
y=alt.Y("y", axis=None),
|
| 38 |
-
color=alt.Color("idx", legend=None, scale=alt.Scale()),
|
| 39 |
-
size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
|
| 40 |
-
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|