Hijiki-HF commited on
Commit
60e69a2
·
1 Parent(s): 881644a

add: app.py

Browse files
Files changed (3) hide show
  1. README.md +2 -1
  2. requirements.txt +66 -0
  3. src/app.py +41 -0
README.md CHANGED
@@ -33,5 +33,6 @@ LLMやBERTなどの自然言語処理技術を使ったプロジェクトの練
33
  ├── practice
34
  └── src
35
  ├── collect # データセットを作成する
36
- └── data
 
37
  ```
 
33
  ├── practice
34
  └── src
35
  ├── collect # データセットを作成する
36
+ ├── data
37
+ └── app.py
38
  ```
requirements.txt ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ altair==5.5.0
2
+ appnope==0.1.4
3
+ asttokens==3.0.0
4
+ attrs==25.1.0
5
+ blinker==1.9.0
6
+ cachetools==5.5.1
7
+ certifi==2025.1.31
8
+ charset-normalizer==3.4.1
9
+ click==8.1.8
10
+ comm==0.2.2
11
+ debugpy==1.8.9
12
+ decorator==5.1.1
13
+ diskcache==5.6.3
14
+ executing==2.1.0
15
+ gitdb==4.0.12
16
+ GitPython==3.1.44
17
+ idna==3.10
18
+ ipykernel==6.29.5
19
+ ipython==8.30.0
20
+ jedi==0.19.2
21
+ Jinja2==3.1.4
22
+ jsonschema==4.23.0
23
+ jsonschema-specifications==2024.10.1
24
+ jupyter_client==8.6.3
25
+ jupyter_core==5.7.2
26
+ llama_cpp_python==0.3.2
27
+ markdown-it-py==3.0.0
28
+ MarkupSafe==3.0.2
29
+ matplotlib-inline==0.1.7
30
+ mdurl==0.1.2
31
+ narwhals==1.27.1
32
+ nest-asyncio==1.6.0
33
+ numpy==2.1.3
34
+ packaging==24.2
35
+ pandas==2.2.3
36
+ parso==0.8.4
37
+ pexpect==4.9.0
38
+ pillow==11.1.0
39
+ platformdirs==4.3.6
40
+ prompt_toolkit==3.0.48
41
+ protobuf==5.29.3
42
+ psutil==6.1.0
43
+ ptyprocess==0.7.0
44
+ pure_eval==0.2.3
45
+ pyarrow==19.0.0
46
+ pydeck==0.9.1
47
+ Pygments==2.18.0
48
+ python-dateutil==2.9.0.post0
49
+ pytz==2024.2
50
+ pyzmq==26.2.0
51
+ referencing==0.36.2
52
+ requests==2.32.3
53
+ rich==13.9.4
54
+ rpds-py==0.22.3
55
+ six==1.17.0
56
+ smmap==5.0.2
57
+ stack-data==0.6.3
58
+ streamlit==1.42.1
59
+ tenacity==9.0.0
60
+ toml==0.10.2
61
+ tornado==6.4.2
62
+ traitlets==5.14.3
63
+ typing_extensions==4.12.2
64
+ tzdata==2024.2
65
+ urllib3==2.3.0
66
+ wcwidth==0.2.13
src/app.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # ページ設定
4
+ st.set_page_config(
5
+ page_title="小説感想生成アプリ(デモ)",
6
+ page_icon="📚",
7
+ layout="centered",
8
+ )
9
+
10
+ # アプリのタイトル
11
+ st.title("小説感想生成アプリ(デモ版)")
12
+ st.subheader("あなたの入力をそのまま返します")
13
+
14
+ # 入力フォーム
15
+ with st.form("input_form"):
16
+ novel_title = st.text_input("小説のタイトル", placeholder="例:人間失格")
17
+ summary = st.text_area("あらすじや感想メモ", height=200, placeholder="例:主人公の葉蔵は自分を「人間失格」だと考えている...")
18
+ submit_button = st.form_submit_button("生成")
19
+
20
+ # 送信ボタンが押されたら結果を表示
21
+ if submit_button:
22
+ st.markdown("## 入力内容")
23
+ st.write(f"**タイトル:** {novel_title}")
24
+ st.write("**あらすじや感想メモ:**")
25
+ st.write(summary)
26
+
27
+ st.markdown("---")
28
+
29
+ st.markdown("## 生成された感想記事(デモ)")
30
+ st.info(f"""
31
+ 【{novel_title}】についての感想
32
+
33
+ {summary}
34
+
35
+ ※このデモ版では入力内容をそのまま返しています。
36
+ 実際のアプリではここにLLMによって生成された内容が表示されます。
37
+ """)
38
+
39
+ # フッター
40
+ st.markdown("---")
41
+ st.caption("Powered by Streamlit & Hugging Face")