Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,14 @@ def decode_text(data):
|
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
-
raw_documents = [{"title": "会議議事録", "url": os.environ.get("URL")+"output_cm.html"}]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
# あなたのクラスとロジックをここに統合します
|
|
@@ -130,7 +137,7 @@ def search(query):
|
|
| 130 |
# Gradioインターフェース
|
| 131 |
interface = gr.Interface(
|
| 132 |
fn=search,
|
| 133 |
-
inputs=[gr.Textbox(label="検索クエリ")],
|
| 134 |
outputs=gr.Textbox(label="検索結果"),
|
| 135 |
title="Vectorstore検索デモ"
|
| 136 |
)
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
+
#raw_documents = [{"title": "会議議事録", "url": os.environ.get("URL")+"output_cm.html"}]
|
| 37 |
+
raw_documents = [{"title": "生成AI", "url": "https://ja.wikipedia.org/wiki/生成的人工知能"}]
|
| 38 |
+
'''raw_documents = [
|
| 39 |
+
{"title": "バグダードの戦い", "url": "https://ja.wikipedia.org/wiki/バグダードの戦い"},
|
| 40 |
+
{"title": "2006年トリノオリンピック", "url": "https://ja.wikipedia.org/wiki/2006年トリノオリンピック"},
|
| 41 |
+
{"title": "ドレッドノート_(戦艦)", "url": "https://ja.wikipedia.org/wiki/ドレッドノート_(戦艦)"},
|
| 42 |
+
{"title": "生成AI", "url": "https://ja.wikipedia.org/wiki/生成的人工知能"}
|
| 43 |
+
]'''
|
| 44 |
|
| 45 |
|
| 46 |
# あなたのクラスとロジックをここに統合します
|
|
|
|
| 137 |
# Gradioインターフェース
|
| 138 |
interface = gr.Interface(
|
| 139 |
fn=search,
|
| 140 |
+
inputs=[gr.Textbox(label="検索クエリ"), value="生成的人工知能モデルについて教えてください。"],
|
| 141 |
outputs=gr.Textbox(label="検索結果"),
|
| 142 |
title="Vectorstore検索デモ"
|
| 143 |
)
|