Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,6 @@ def process_data(data, namespace):
|
|
90 |
|
91 |
def load_and_process_data(file):
|
92 |
data = pd.read_csv(file)
|
93 |
-
data = data[0:500]
|
94 |
data['id'] = data.index.astype(str)
|
95 |
namespace = file.name[:15] # Use first 15 characters of file name as namespace
|
96 |
if 'embeddings_done' not in st.session_state:
|
@@ -136,7 +135,7 @@ def main():
|
|
136 |
)
|
137 |
|
138 |
st.subheader("Query Results:")
|
139 |
-
if result:
|
140 |
id = result['matches'][0]['id']
|
141 |
data = st.session_state.df
|
142 |
answer = data[data['id'] == id]['Answer'].values[0]
|
|
|
90 |
|
91 |
def load_and_process_data(file):
|
92 |
data = pd.read_csv(file)
|
|
|
93 |
data['id'] = data.index.astype(str)
|
94 |
namespace = file.name[:15] # Use first 15 characters of file name as namespace
|
95 |
if 'embeddings_done' not in st.session_state:
|
|
|
135 |
)
|
136 |
|
137 |
st.subheader("Query Results:")
|
138 |
+
if result is not None:
|
139 |
id = result['matches'][0]['id']
|
140 |
data = st.session_state.df
|
141 |
answer = data[data['id'] == id]['Answer'].values[0]
|