matt1847 Claude Opus 4.5 commited on
Commit
c8db51a
·
1 Parent(s): 0da495a

変更: Streamlit UIに戻す

Browse files

- HF SpacesをStreamlit SDKに変更
- 無料プランで動作するよう維持

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (3) hide show
  1. README.md +2 -2
  2. app.py +19 -6
  3. requirements.txt +1 -1
README.md CHANGED
@@ -2,8 +2,8 @@
2
  title: will
3
  colorFrom: gray
4
  colorTo: gray
5
- sdk: gradio
6
- sdk_version: 5.23.3
7
  app_file: app.py
8
  pinned: false
9
  ---
 
2
  title: will
3
  colorFrom: gray
4
  colorTo: gray
5
+ sdk: streamlit
6
+ sdk_version: 1.41.1
7
  app_file: app.py
8
  pinned: false
9
  ---
app.py CHANGED
@@ -1,19 +1,32 @@
1
  """
2
- WILL - Pure Computational Will (Gradio版)
3
 
4
  言語モデルにランダムノイズを入力し、
5
  人間の問いかけなしにモデルの構造だけが
6
  出力するものを観測する
7
-
8
- ZeroGPU対応 - Hugging Face Spacesで無料GPU利用可能
9
  """
10
- from src.ui.gradio import create_app
 
 
 
11
 
12
 
13
  def main():
14
  """アプリケーションのエントリーポイント"""
15
- app = create_app()
16
- app.launch()
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
 
19
  if __name__ == "__main__":
 
1
  """
2
+ WILL - Pure Computational Will (Streamlit版)
3
 
4
  言語モデルにランダムノイズを入力し、
5
  人間の問いかけなしにモデルの構造だけが
6
  出力するものを観測する
 
 
7
  """
8
+ import streamlit as st
9
+
10
+ from src.ui.streamlit.styles import CUSTOM_CSS
11
+ from src.ui.streamlit.pages import render_generate_page, render_concept_page
12
 
13
 
14
  def main():
15
  """アプリケーションのエントリーポイント"""
16
+ # ページ設定
17
+ st.set_page_config(page_title="will", page_icon="", layout="centered")
18
+
19
+ # カスタムCSS適用
20
+ st.markdown(CUSTOM_CSS, unsafe_allow_html=True)
21
+
22
+ # タブ構成
23
+ tab1, tab2 = st.tabs(["GENERATE", "CONCEPT"])
24
+
25
+ with tab1:
26
+ render_generate_page()
27
+
28
+ with tab2:
29
+ render_concept_page()
30
 
31
 
32
  if __name__ == "__main__":
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  torch
2
  transformers
3
- gradio
4
  matplotlib
5
  numpy
6
  pillow
 
1
  torch
2
  transformers
3
+ streamlit
4
  matplotlib
5
  numpy
6
  pillow