Update pages/pages_5_QuizMaster.py
Browse files
pages/pages_5_QuizMaster.py
CHANGED
@@ -68,10 +68,16 @@ def findImg(input_sentence):
|
|
68 |
folder_path = 'images_collection'
|
69 |
threshold = 0.5
|
70 |
most_reliable_image = find_most_reliable_image(folder_path, input_sentence, threshold)
|
|
|
71 |
########################################
|
72 |
|
|
|
73 |
def get_image(prompt: str) -> str:
|
74 |
return findImg(prompt)
|
|
|
|
|
|
|
|
|
75 |
|
76 |
|
77 |
|
|
|
68 |
folder_path = 'images_collection'
|
69 |
threshold = 0.5
|
70 |
most_reliable_image = find_most_reliable_image(folder_path, input_sentence, threshold)
|
71 |
+
return most_reliable_image
|
72 |
########################################
|
73 |
|
74 |
+
@st.cache_data
|
75 |
def get_image(prompt: str) -> str:
|
76 |
return findImg(prompt)
|
77 |
+
#try:
|
78 |
+
# return findImg(prompt)
|
79 |
+
#except:
|
80 |
+
# return "image.png"
|
81 |
|
82 |
|
83 |
|