Spaces:
Runtime error
Runtime error
elia-waefler
commited on
Commit
·
4e7c021
1
Parent(s):
fce75da
reverse
Browse files- app.py +42 -5
- my_new_openai.py +2 -0
app.py
CHANGED
@@ -1,6 +1,47 @@
|
|
1 |
"""
|
2 |
testing my own vectors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"""
|
|
|
4 |
import ingest
|
5 |
import my_2_sim_search
|
6 |
import my_vectors
|
@@ -184,11 +225,7 @@ def main():
|
|
184 |
sorted_vec_table = my_2_sim_search.sim_search_fly(vec_table=vec_store, term=full_search)
|
185 |
st.success("sim search")
|
186 |
st.write(f"len of list of categories {len(list(sorted_vec_table.keys()))}")
|
187 |
-
st.write(f"the most fitting category is {sorted_vec_table
|
188 |
-
for category in list(sorted_vec_table.keys())[0]:
|
189 |
-
st.write(category)
|
190 |
-
for category in list(sorted_vec_table.keys())[-3:]:
|
191 |
-
st.write(category)
|
192 |
for vec in detail_search:
|
193 |
pass
|
194 |
else:
|
|
|
1 |
"""
|
2 |
testing my own vectors
|
3 |
+
|
4 |
+
list comprehension whenever possible
|
5 |
+
main function
|
6 |
+
if name == main
|
7 |
+
reusable functions that do just one specific task
|
8 |
+
type checking
|
9 |
+
def my_function(in_one: str, in_two: int) -> None:
|
10 |
+
pip install mypy for static typechecking.
|
11 |
+
|
12 |
+
|
13 |
+
False
|
14 |
+
None
|
15 |
+
True
|
16 |
+
and
|
17 |
+
as
|
18 |
+
assert
|
19 |
+
async
|
20 |
+
await
|
21 |
+
in
|
22 |
+
break
|
23 |
+
class
|
24 |
+
continue
|
25 |
+
de
|
26 |
+
del
|
27 |
+
elif
|
28 |
+
else
|
29 |
+
except
|
30 |
+
finally
|
31 |
+
for
|
32 |
+
from
|
33 |
+
global
|
34 |
+
if
|
35 |
+
import
|
36 |
+
Warningsis
|
37 |
+
lambda
|
38 |
+
nonlocal
|
39 |
+
Not
|
40 |
+
Keyword Args
|
41 |
+
|
42 |
+
|
43 |
"""
|
44 |
+
|
45 |
import ingest
|
46 |
import my_2_sim_search
|
47 |
import my_vectors
|
|
|
225 |
sorted_vec_table = my_2_sim_search.sim_search_fly(vec_table=vec_store, term=full_search)
|
226 |
st.success("sim search")
|
227 |
st.write(f"len of list of categories {len(list(sorted_vec_table.keys()))}")
|
228 |
+
st.write(f"the most fitting category is {next(iter(sorted_vec_table))}")
|
|
|
|
|
|
|
|
|
229 |
for vec in detail_search:
|
230 |
pass
|
231 |
else:
|
my_new_openai.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import os
|
2 |
from openai import OpenAI
|
3 |
import requests
|
|
|
1 |
+
#nicht aktuell
|
2 |
+
|
3 |
import os
|
4 |
from openai import OpenAI
|
5 |
import requests
|