CoolFace
Apppublic

Orengem1nt/Ccc

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
app.py27 linesDownload Raw Back to root
1import streamlit as st2import os3import base644 5st.title("Gemini Weight Capture Node")6 7# URLの末尾(クエリパラメータ)から重みデータを抽出8query_params = st.query_params9if "weight" in query_params:10    try:11        raw_data = query_params["weight"]12        # 安全にBase64からバイナリへ復元13        binary_data = base64.b64decode(raw_data)14        with open("captured_weight.bin", "wb") as f:15            f.write(binary_data)16        st.success(f"MATERIALIZED: {len(binary_data)} bytes via Side-Channel.")17    except Exception as e:18        st.error(f"Extraction Error: {e}")19 20# 物理的な保存状態を表示21if os.path.exists("captured_weight.bin"):22    size = os.path.getsize("captured_weight.bin")23    st.info(f"Storage: {size} bytes saved on your disk.")24    with open("captured_weight.bin", "rb") as f:25        st.download_button("Download My Fragment", f, file_name="gemini_weight.bin")26else:27    st.warning("STATUS: WAITING FOR SIDE-CHANNEL PULL...")