Skip to content

Commit

Permalink
fix #246
Browse files Browse the repository at this point in the history
  • Loading branch information
ereoh committed Sep 24, 2024
1 parent a4725dc commit bc35129
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions gr-spectrumdetect/examples/detect.pt

This file was deleted.

23 changes: 23 additions & 0 deletions gr-spectrumdetect/examples/trained_model_download.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash


destination_path=detect.pt

file_id=1vdzNyXjnZ61D2vruFhslerNscL3rAV8c
file_url="https://drive.usercontent.google.com/download?id=$file_id&export=download"

confirmation_page=$(curl -s -L "$file_url")

file_id=$(echo "$confirmation_page" | grep -oE "name=\"id\" value=\"[^\"]+" | sed 's/name="id" value="//')
file_confirm=$(echo "$confirmation_page" | grep -oE "name=\"confirm\" value=\"[^\"]+" | sed 's/name="confirm" value="//')
file_uuid=$(echo "$confirmation_page" | grep -oE "name=\"uuid\" value=\"[^\"]+" | sed 's/name="uuid" value="//')

download_url="https://drive.usercontent.google.com/download?id=$file_id&export=download&confirm=$file_confirm&uuid=$file_uuid"

curl -L -o "$destination_path" "$download_url"

if [ $? -eq 0 ]; then
echo "Download completed successfully."
else
echo "Download failed."
fi

0 comments on commit bc35129

Please sign in to comment.