hsmashiana commited on
Commit
3ddbfb1
1 Parent(s): e7c1419

removed decode

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -15,7 +15,6 @@ ort_model = ORTModelForFeatureExtraction.from_pretrained("hsmashiana/optimized_m
15
  tokenizer = AutoTokenizer.from_pretrained("hsmashiana/optimized_model_hpml")
16
  model3 = OnnxSetFitModel(ort_model, tokenizer, model1.model_head)
17
 
18
- decode = {0: "World", 1: "Sports", 2: "Business", 3: "Sci/Tech"}
19
 
20
  def plot_throughput_bar_chart(throughput_model1, throughput_model2):
21
  labels = ['Base model', 'Optimized model']
@@ -76,13 +75,13 @@ def compare_models(text):
76
 
77
  result1 = {
78
  "Base Model": {
79
- "answer": decode[out1.numpy()[0]],
80
  "average time (ms)": avg_latency_ms_model_1,
81
  "throughput (tokens/sec)": throughput_tokens_per_sec1
82
  }}
83
  result2 = {
84
  "Optimized Model": {
85
- "answer": decode[out3.numpy()[0]],
86
  "average time (ms)": avg_latency_ms_model_3,
87
  "throughput (tokens/sec)": throughput_tokens_per_sec2
88
  }}
 
15
  tokenizer = AutoTokenizer.from_pretrained("hsmashiana/optimized_model_hpml")
16
  model3 = OnnxSetFitModel(ort_model, tokenizer, model1.model_head)
17
 
 
18
 
19
  def plot_throughput_bar_chart(throughput_model1, throughput_model2):
20
  labels = ['Base model', 'Optimized model']
 
75
 
76
  result1 = {
77
  "Base Model": {
78
+ "answer": out1.numpy()[0],
79
  "average time (ms)": avg_latency_ms_model_1,
80
  "throughput (tokens/sec)": throughput_tokens_per_sec1
81
  }}
82
  result2 = {
83
  "Optimized Model": {
84
+ "answer": out3.numpy()[0],
85
  "average time (ms)": avg_latency_ms_model_3,
86
  "throughput (tokens/sec)": throughput_tokens_per_sec2
87
  }}