-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sample pipeline for supreme court hearing transcripts (#250)
* chore: ui nits * chore: ui nits * feat: add tutorial for the supreme court hearings
- Loading branch information
1 parent
0627af3
commit 329d47f
Showing
16 changed files
with
1,569 additions
and
704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { NextResponse } from "next/server"; | ||
|
||
export async function GET(request: Request) { | ||
const { searchParams } = new URL(request.url); | ||
const fileId = searchParams.get("fileId"); | ||
|
||
if (!fileId) { | ||
return new NextResponse("File ID is required", { status: 400 }); | ||
} | ||
|
||
try { | ||
const driveUrl = `https://drive.google.com/uc?export=download&id=${fileId}`; | ||
const response = await fetch(driveUrl); | ||
|
||
if (!response.ok) { | ||
throw new Error("Failed to download file from Google Drive"); | ||
} | ||
|
||
const data = await response.blob(); | ||
return new NextResponse(data); | ||
} catch (error) { | ||
console.error("Error downloading tutorial dataset:", error); | ||
return new NextResponse("Failed to download tutorial dataset", { | ||
status: 500, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.