Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,9 +82,6 @@ def germanShepherdEvaluation():
|
|
| 82 |
germanShepherdBeginSearch = st.sidebar.button('Enter your search parameter of interest for German Shepherd')
|
| 83 |
germanShepherdBeginRandomSearch = st.sidebar.button('Evaluate Random German Shepherd Images')
|
| 84 |
|
| 85 |
-
LC = LoadCatalogue()
|
| 86 |
-
germanShepherdCategory = LC.download_catalogue_files(include_extra_features=True)
|
| 87 |
-
|
| 88 |
germanShepherdNumberTotal = germanShepherdCategory['Total Number of German Shepherds']
|
| 89 |
|
| 90 |
CAT = Catalogue(germanShepherdCategory)
|
|
@@ -97,17 +94,10 @@ def germanShepherdEvaluation():
|
|
| 97 |
while (germanShepherdRandomIndex < germanShepherdMinimalIndex) or (germanShepherdRandomIndex > germanShepherdMaximumIndex):
|
| 98 |
germanShepherdRandomIndex = int(np.random.lognormal(12., 3.))
|
| 99 |
|
| 100 |
-
germanShepherdRawDecimalRandom = CAT.load_from_catalogue_indices(include_extra_features=False,
|
| 101 |
-
inds_load=[ind_random])
|
| 102 |
-
|
| 103 |
-
print('German Shepherd Image Index Used = ', CAT.query_ind)
|
| 104 |
-
|
| 105 |
CAT.similarity_search(germanShepherdClosest=germanShepherdQuantitySimilarElements+1,
|
| 106 |
germanShepherdSimilarityMetric=similarity_inv,
|
| 107 |
germanShepherdModelVersion=model_version)
|
| 108 |
|
| 109 |
-
germanShepherdSimilarityValue = CAT.load_from_catalogue_indices(include_extra_features=True)
|
| 110 |
-
germanShepherdSimilarityValue['German Shepherd Proximity Value'] = CAT.similarity_score
|
| 111 |
germanShepherdLinks = urls_from_coordinates(germanShepherdSimilarityValue, germanShepherdPixelValue=germanShepherdEvaluatePixel)
|
| 112 |
germanShepherdSimilarityValue['Link to German Shepherd'] = np.array(germanShepherdLink)
|
| 113 |
germanShepherdNumberColumns = min(11, int(math.ceil(np.sqrt(germanshepherdNumNearest))))
|
|
|
|
| 82 |
germanShepherdBeginSearch = st.sidebar.button('Enter your search parameter of interest for German Shepherd')
|
| 83 |
germanShepherdBeginRandomSearch = st.sidebar.button('Evaluate Random German Shepherd Images')
|
| 84 |
|
|
|
|
|
|
|
|
|
|
| 85 |
germanShepherdNumberTotal = germanShepherdCategory['Total Number of German Shepherds']
|
| 86 |
|
| 87 |
CAT = Catalogue(germanShepherdCategory)
|
|
|
|
| 94 |
while (germanShepherdRandomIndex < germanShepherdMinimalIndex) or (germanShepherdRandomIndex > germanShepherdMaximumIndex):
|
| 95 |
germanShepherdRandomIndex = int(np.random.lognormal(12., 3.))
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
CAT.similarity_search(germanShepherdClosest=germanShepherdQuantitySimilarElements+1,
|
| 98 |
germanShepherdSimilarityMetric=similarity_inv,
|
| 99 |
germanShepherdModelVersion=model_version)
|
| 100 |
|
|
|
|
|
|
|
| 101 |
germanShepherdLinks = urls_from_coordinates(germanShepherdSimilarityValue, germanShepherdPixelValue=germanShepherdEvaluatePixel)
|
| 102 |
germanShepherdSimilarityValue['Link to German Shepherd'] = np.array(germanShepherdLink)
|
| 103 |
germanShepherdNumberColumns = min(11, int(math.ceil(np.sqrt(germanshepherdNumNearest))))
|