Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,14 +2,14 @@ import json
|
|
| 2 |
import streamlit as st
|
| 3 |
from gpt_index import GPTListIndex
|
| 4 |
|
| 5 |
-
search_gpt_index =
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
|
| 14 |
if __name__ == '__main__':
|
| 15 |
search_gpt_index()
|
|
|
|
| 2 |
import streamlit as st
|
| 3 |
from gpt_index import GPTListIndex
|
| 4 |
|
| 5 |
+
search_gpt_index = GPTListIndex.load_from_disk('index-4.json')
|
| 6 |
|
| 7 |
+
# Define the app layout
|
| 8 |
+
st.title('GPT Search')
|
| 9 |
+
query = st.text_input('Enter a query:')
|
| 10 |
+
if query:
|
| 11 |
+
result = gpt_index.query(query)
|
| 12 |
+
st.write(result)
|
| 13 |
|
| 14 |
if __name__ == '__main__':
|
| 15 |
search_gpt_index()
|