Skip to content

Commit

Permalink
refactor: remove model zoo URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Dec 28, 2023
1 parent af97600 commit 153d7af
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 685 deletions.
4 changes: 2 additions & 2 deletions examples/gpt2/examples/gpt2-no-ndarray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
sync::Arc
};

use ort::{download::language::machine_comprehension::GPT2, inputs, CUDAExecutionProvider, GraphOptimizationLevel, Session};
use ort::{inputs, CUDAExecutionProvider, GraphOptimizationLevel, Session};
use rand::Rng;
use tokenizers::Tokenizer;

Expand Down Expand Up @@ -36,7 +36,7 @@ fn main() -> ort::Result<()> {
let session = Session::builder()?
.with_optimization_level(GraphOptimizationLevel::Level1)?
.with_intra_threads(1)?
.with_model_downloaded(GPT2::GPT2LmHead)?;
.with_model_downloaded("https://parcel.pyke.io/v2/cdn/assetdelivery/ortrsv2/ex_models/gpt2.onnx")?;

// Load the tokenizer and encode the prompt into a sequence of tokens.
let tokenizer = Tokenizer::from_file(Path::new(env!("CARGO_MANIFEST_DIR")).join("data").join("tokenizer.json")).unwrap();
Expand Down
4 changes: 2 additions & 2 deletions examples/gpt2/examples/gpt2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
};

use ndarray::{array, concatenate, s, Array1, Axis};
use ort::{download::language::machine_comprehension::GPT2, inputs, CUDAExecutionProvider, GraphOptimizationLevel, Session, Tensor};
use ort::{inputs, CUDAExecutionProvider, GraphOptimizationLevel, Session, Tensor};
use rand::Rng;
use tokenizers::Tokenizer;

Expand Down Expand Up @@ -36,7 +36,7 @@ fn main() -> ort::Result<()> {
let session = Session::builder()?
.with_optimization_level(GraphOptimizationLevel::Level1)?
.with_intra_threads(1)?
.with_model_downloaded(GPT2::GPT2LmHead)?;
.with_model_downloaded("https://parcel.pyke.io/v2/cdn/assetdelivery/ortrsv2/ex_models/gpt2.onnx")?;

// Load the tokenizer and encode the prompt into a sequence of tokens.
let tokenizer = Tokenizer::from_file(Path::new(env!("CARGO_MANIFEST_DIR")).join("data").join("tokenizer.json")).unwrap();
Expand Down
5 changes: 0 additions & 5 deletions src/download/language.rs

This file was deleted.

77 changes: 0 additions & 77 deletions src/download/language/machine_comprehension.rs

This file was deleted.

14 changes: 0 additions & 14 deletions src/download/mod.rs

This file was deleted.

13 changes: 0 additions & 13 deletions src/download/vision.rs

This file was deleted.

26 changes: 0 additions & 26 deletions src/download/vision/body_face_gesture_analysis.rs

This file was deleted.

20 changes: 0 additions & 20 deletions src/download/vision/domain_based_image_classification.rs

This file was deleted.

Loading

0 comments on commit 153d7af

Please sign in to comment.