cifkao commited on
Commit
ebb68fb
1 Parent(s): dc1d5c3

Fix Python 3.8 compatibility

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,6 +1,5 @@
1
- from enum import Enum
2
  from pathlib import Path
3
- from typing import Hashable
4
 
5
  import streamlit as st
6
  import streamlit.components.v1 as components
@@ -222,7 +221,7 @@ def generate(model, inputs, metric, window_len, max_new_tokens):
222
  def run_context_length_probing(
223
  _model: GPT2LMHeadModel,
224
  _tokenizer: PreTrainedTokenizer,
225
- _inputs: dict[str, torch.Tensor],
226
  window_len: int,
227
  metric: str,
228
  generation_mode: bool,
 
 
1
  from pathlib import Path
2
+ from typing import Dict, Hashable
3
 
4
  import streamlit as st
5
  import streamlit.components.v1 as components
 
221
  def run_context_length_probing(
222
  _model: GPT2LMHeadModel,
223
  _tokenizer: PreTrainedTokenizer,
224
+ _inputs: Dict[str, torch.Tensor],
225
  window_len: int,
226
  metric: str,
227
  generation_mode: bool,