m3hrdadfi commited on
Commit
f587562
β€’
1 Parent(s): 6851088

Fix some bugs

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +3 -3
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  title: GPT2 Persian
3
  emoji: 🀘
4
- colorFrom: orange
5
  colorTo: red
6
  sdk: streamlit
7
  app_file: app.py
 
1
  ---
2
  title: GPT2 Persian
3
  emoji: 🀘
4
+ colorFrom: yellow
5
  colorTo: red
6
  sdk: streamlit
7
  app_file: app.py
app.py CHANGED
@@ -33,7 +33,7 @@ class TextGeneration:
33
  if not self.debug:
34
  generation_kwargs["num_return_sequences"] = 1
35
 
36
- max_length = len(self.tokenizer(prompt)["input_ids"][0]) + generation_kwargs["max_length"]
37
  generation_kwargs["max_length"] = max_length
38
 
39
  return self.generator(
@@ -53,8 +53,8 @@ def load_text_generator():
53
 
54
  def main():
55
  st.set_page_config(
56
- page_title="X",
57
- page_icon="🧊",
58
  layout="wide",
59
  initial_sidebar_state="expanded"
60
  )
 
33
  if not self.debug:
34
  generation_kwargs["num_return_sequences"] = 1
35
 
36
+ max_length = len(self.tokenizer(prompt)["input_ids"]) + generation_kwargs["max_length"]
37
  generation_kwargs["max_length"] = max_length
38
 
39
  return self.generator(
 
53
 
54
  def main():
55
  st.set_page_config(
56
+ page_title="GPT2 - Persian",
57
+ page_icon="🀘",
58
  layout="wide",
59
  initial_sidebar_state="expanded"
60
  )