Add stage direction generation
This commit is contained in:
parent
f9efc7fd40
commit
9f144d0fa6
8
chain.py
8
chain.py
|
@ -12,8 +12,16 @@ for corpus in os.listdir("corpora"):
|
|||
else:
|
||||
combined_model = model
|
||||
|
||||
stage_directions = None
|
||||
with open("stagedirections.txt") as f:
|
||||
stage_directions = markovify.Text(f.read())
|
||||
|
||||
def make_direction(*args,**kwargs):
|
||||
return stage_directions.make_sentence(*args,**kwargs)
|
||||
|
||||
def make_sentence(*args,**kwargs):
|
||||
return combined_model.make_sentence(*args,**kwargs)
|
||||
|
||||
if __name__=="__main__":
|
||||
print(make_direction(tries=100))
|
||||
print(combined_model.make_sentence(tries=100))
|
||||
|
|
Loading…
Reference in New Issue