pip64 ierhon commited on
Commit
8a45068
1 Parent(s): 6e379b9

Оптимизация (#3)

Browse files

- Оптимизация (ce185db27a0a69926103b666caf171da4be02827)


Co-authored-by: - - - <ierhon@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -2,13 +2,13 @@ import gradio as gr
2
  import markovify
3
  import random
4
 
 
 
 
 
5
  def gen(text):
6
  dataset = "./dataset.txt"
7
 
8
- with open(dataset, encoding="utf-8") as f:
9
- db = f.read()
10
- db = db.strip().lower()
11
-
12
  text_model = markovify.NewlineText(
13
  input_text=db,
14
  state_size=1,
 
2
  import markovify
3
  import random
4
 
5
+ with open(dataset, encoding="utf-8") as f:
6
+ db = f.read()
7
+ db = db.strip().lower()
8
+
9
  def gen(text):
10
  dataset = "./dataset.txt"
11
 
 
 
 
 
12
  text_model = markovify.NewlineText(
13
  input_text=db,
14
  state_size=1,