Spaces:
Sleeping
Sleeping
update app
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def visualize_trajectory(dataset, index):
|
|
| 41 |
|
| 42 |
# Handle video file path (could be local path or HuggingFace Hub URL)
|
| 43 |
if isinstance(frames_data, str):
|
| 44 |
-
video_path = frames_data
|
| 45 |
frames_info = f"Video file: {video_path}"
|
| 46 |
else:
|
| 47 |
return None, "Error: Invalid video path", "Error: Invalid video path", None
|
|
@@ -243,8 +243,10 @@ with gr.Blocks(title="RFM Dataset Visualizer") as demo:
|
|
| 243 |
outputs=slider
|
| 244 |
)
|
| 245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
# Launch the app
|
| 247 |
if __name__ == "__main__":
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
# hello
|
|
|
|
| 41 |
|
| 42 |
# Handle video file path (could be local path or HuggingFace Hub URL)
|
| 43 |
if isinstance(frames_data, str):
|
| 44 |
+
video_path = f"https://huggingface.co/datasets/aliangdw/rfm/resolve/main/{frames_data}"
|
| 45 |
frames_info = f"Video file: {video_path}"
|
| 46 |
else:
|
| 47 |
return None, "Error: Invalid video path", "Error: Invalid video path", None
|
|
|
|
| 243 |
outputs=slider
|
| 244 |
)
|
| 245 |
|
| 246 |
+
def main():
|
| 247 |
+
"""Main function to launch the RFM visualizer."""
|
| 248 |
+
demo.launch()
|
| 249 |
+
|
| 250 |
# Launch the app
|
| 251 |
if __name__ == "__main__":
|
| 252 |
+
main()
|
|
|
|
|
|