glburl / sapp2.py
haraberget's picture
Rename sapp.py to sapp2.py
edd0556 verified
Raw
History Blame
756 Bytes
import os
import streamlit as st
from kaggle.api.kaggle_api_extended import KaggleApi
st.set_page_config(
page_title="Kaggle Controller",
page_icon="πŸš€"
)
st.title("πŸš€ Kaggle Controller")
NOTEBOOK = "haraberget/https-github-com-jigs10-ltx-2-5-kaggle-wan2gp"
if "KAGGLE_API_TOKEN" not in os.environ:
st.error("KAGGLE_API_TOKEN is not configured!")
st.stop()
st.success("Kaggle token found")
api = KaggleApi()
api.authenticate()
st.write("Connected to Kaggle")
if st.button("πŸ” Check notebook"):
try:
kernel = api.kernel_status(
"haraberget",
"https-github-com-jigs10-ltx-2-5-kaggle-wan2gp"
)
st.json(kernel)
except Exception as e:
st.error(f"Kaggle error: {e}")