Add Video Learning Agent for short video platforms
Features: - VideoLearningAgent for automated video watching on Douyin/Kuaishou/TikTok - Web dashboard UI for video learning sessions - Real-time progress tracking with screenshot capture - App detection using get_current_app() for accurate recording - Session management with pause/resume/stop controls Technical improvements: - Simplified video detection logic using direct app detection - Full base64 hash for sensitive screenshot change detection - Immediate stop when target video count is reached - Fixed circular import issues with ModelConfig Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
35
scripts/run_video_learning_demo.bat
Normal file
35
scripts/run_video_learning_demo.bat
Normal file
@@ -0,0 +1,35 @@
|
||||
@echo off
|
||||
REM Video Learning Demo Script for Windows
|
||||
REM This script starts the dashboard and opens the video learning page
|
||||
|
||||
echo ============================================
|
||||
echo AutoGLM Video Learning Demo
|
||||
echo ============================================
|
||||
echo.
|
||||
echo Starting Dashboard...
|
||||
echo.
|
||||
|
||||
REM Start the dashboard in background
|
||||
start "AutoGLM Dashboard" python -m uvicorn dashboard.main:app --host 0.0.0.0 --port 8080 --reload
|
||||
|
||||
echo Waiting for dashboard to start...
|
||||
timeout /t 3 /nobreak > nul
|
||||
|
||||
echo.
|
||||
echo Dashboard starting at: http://localhost:8080
|
||||
echo Opening Video Learning page in browser...
|
||||
echo.
|
||||
|
||||
REM Open the video learning page
|
||||
start http://localhost:8080/static/video-learning.html
|
||||
|
||||
echo.
|
||||
echo ============================================
|
||||
echo Video Learning Demo is ready!
|
||||
echo ============================================
|
||||
echo.
|
||||
echo Press Ctrl+C to stop the dashboard
|
||||
echo.
|
||||
|
||||
REM Keep the script running
|
||||
pause
|
||||
43
scripts/run_video_learning_demo.sh
Normal file
43
scripts/run_video_learning_demo.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# Video Learning Demo Script for Linux/Mac
|
||||
# This script starts the dashboard and opens the video learning page
|
||||
|
||||
echo "============================================"
|
||||
echo "AutoGLM Video Learning Demo"
|
||||
echo "============================================"
|
||||
echo ""
|
||||
echo "Starting Dashboard..."
|
||||
echo ""
|
||||
|
||||
# Start the dashboard in background
|
||||
python -m uvicorn dashboard.main:app --host 0.0.0.0 --port 8080 --reload &
|
||||
DASHBOARD_PID=$!
|
||||
|
||||
echo "Waiting for dashboard to start..."
|
||||
sleep 3
|
||||
|
||||
echo ""
|
||||
echo "Dashboard starting at: http://localhost:8080"
|
||||
echo "Opening Video Learning page in browser..."
|
||||
echo ""
|
||||
|
||||
# Open the video learning page
|
||||
if command -v xdg-open > /dev/null; then
|
||||
xdg-open http://localhost:8080/static/video-learning.html
|
||||
elif command -v open > /dev/null; then
|
||||
open http://localhost:8080/static/video-learning.html
|
||||
else
|
||||
echo "Please open your browser and navigate to:"
|
||||
echo "http://localhost:8080/static/video-learning.html"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "============================================"
|
||||
echo "Video Learning Demo is ready!"
|
||||
echo "============================================"
|
||||
echo ""
|
||||
echo "Press Ctrl+C to stop the dashboard"
|
||||
echo ""
|
||||
|
||||
# Wait for dashboard process
|
||||
wait $DASHBOARD_PID
|
||||
Reference in New Issue
Block a user