Spaces:
Running
Running
File size: 1,967 Bytes
162019f 185fa42 162019f 185fa42 fada260 185fa42 de62b13 185fa42 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
import sys
import streamlit as st
st.set_page_config(
page_title="Home",
page_icon="π ",
layout="wide"
)
from transcript_extractor import test_api_key, initialize_youtube_api
import logging
import os
# Configure logging to use only stdout
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
stream=sys.stdout # This ensures logging goes to stdout only
)
logger = logging.getLogger(__name__)
def main():
st.title("YouTube Transcript RAG System π₯")
st.write("Welcome to the YouTube Transcript RAG System!")
# Check API key
if not test_api_key():
st.error("YouTube API key is invalid or not set. Please check your configuration.")
new_api_key = st.text_input("Enter your YouTube API key:")
if new_api_key:
os.environ['YOUTUBE_API_KEY'] = new_api_key
if test_api_key():
st.success("API key validated successfully!")
st.experimental_rerun()
else:
st.error("Invalid API key. Please try again.")
return
st.success("System is ready! Please use the sidebar to navigate between different functions.")
# Display system overview
st.header("System Overview")
st.write("""
This system provides the following functionality:
1. **Data Ingestion** π₯
- Process YouTube videos and transcripts
- Support for single videos or entire channels
2. **Chat Interface** π¬
- Interactive chat with processed videos
- Multiple query rewriting methods
- Various search strategies
3. **Ground Truth Generation** π
- Generate and manage ground truth questions
- Export ground truth data
4. **RAG Evaluation** π
- Evaluate system performance
- View detailed metrics and analytics
""")
if __name__ == "__main__":
main() |