ErikDaska commited on
Commit
461a5c5
·
verified ·
1 Parent(s): 8e34a70

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +0 -4
src/streamlit_app.py CHANGED
@@ -6,10 +6,6 @@ import os
6
  # Read token from environment (set as secret in Space settings)
7
  token = os.environ.get("token")
8
 
9
- def infer(sent, max_length, num_return_sequences):
10
- generator = pipeline('text-generation', model='gpt2')
11
-
12
- return generator(sent, max_length=max_length, num_return_sequences=num_return_sequences)
13
 
14
  def instantiate_gpt2(max_length_ : int, num_return_sequences : int, text : str) -> dict:
15
  pipe = pipeline(task='text-generation', model='Iscte-Sintra/GPT2-Kriolu', tokenizer='Iscte-Sintra/GPT2-Kriolu', token=token)
 
6
  # Read token from environment (set as secret in Space settings)
7
  token = os.environ.get("token")
8
 
 
 
 
 
9
 
10
  def instantiate_gpt2(max_length_ : int, num_return_sequences : int, text : str) -> dict:
11
  pipe = pipeline(task='text-generation', model='Iscte-Sintra/GPT2-Kriolu', tokenizer='Iscte-Sintra/GPT2-Kriolu', token=token)