Spaces:
Build error
Build error
Show error in HF Spaces.
Browse files
app.py
CHANGED
@@ -137,6 +137,7 @@ def get_auto_comparison(url, target, smoothing_window_size=10, method="CUSUM"):
|
|
137 |
""" Function for Gradio to combine all helper functions"""
|
138 |
distance = get_decent_distance(url, target, MIN_DISTANCE, MAX_DISTANCE)
|
139 |
if distance == None:
|
|
|
140 |
raise gr.Error("No matches found!")
|
141 |
video_index, hash_vectors, target_indices = get_video_indices(url, target, MIN_DISTANCE = distance)
|
142 |
lims, D, I, hash_vectors = compare_videos(hash_vectors, target_indices, MIN_DISTANCE = distance)
|
@@ -175,5 +176,5 @@ if __name__ == "__main__":
|
|
175 |
import matplotlib
|
176 |
matplotlib.use('SVG') # To be able to plot in gradio
|
177 |
|
178 |
-
iface.launch(
|
179 |
#iface.launch(auth=("test", "test"), share=True, debug=True)
|
|
|
137 |
""" Function for Gradio to combine all helper functions"""
|
138 |
distance = get_decent_distance(url, target, MIN_DISTANCE, MAX_DISTANCE)
|
139 |
if distance == None:
|
140 |
+
return None
|
141 |
raise gr.Error("No matches found!")
|
142 |
video_index, hash_vectors, target_indices = get_video_indices(url, target, MIN_DISTANCE = distance)
|
143 |
lims, D, I, hash_vectors = compare_videos(hash_vectors, target_indices, MIN_DISTANCE = distance)
|
|
|
176 |
import matplotlib
|
177 |
matplotlib.use('SVG') # To be able to plot in gradio
|
178 |
|
179 |
+
iface.launch(show_error=True)
|
180 |
#iface.launch(auth=("test", "test"), share=True, debug=True)
|