Open gamanox opened 3 years ago
Hey, I made a new notebook that works that way here: https://github.com/lots-of-things/Story2Hallucination/blob/main/Story2Hallucination_preset.ipynb
I didn't test it so there might be bugs, but this should do it. Could you test it and let me know if it works?
OMG, let me test it out, thank you very much, keep you posted. Thanks again
It works so much better,
let me do more testing before closing the issue.
awesome, glad it's working, I might try using it that way more. I did that for one of my earlier experiments, but then I switched to incrementing through one word at a time just for simplicity.
I am able to run your regular version fine in Colab, but when I import this "preset" version into Colab and run it I get this error:
NameError Traceback (most recent call last)
Line 64 just needed to be removed. I've updated the file in the repo.
I get this error now:
NameError Traceback (most recent call last)
filename = TEXT.replace(' ', '_')
all_text_list = ["The moon has a face like the clock in the hall,", "She shines on thieves on the garden wall,", "On streets and fields and harbour quays,", "And birdies asleep in the forks of the trees,"]
burnin=20 # checkin_gap = 10 long_sim_gap = 10 span = 6 iterations = 100 display_gap = 50 similarity = 0.9
words = all_text_list all_text_list = [" ".join(words[i:i+span]) for i in range(0, len(words), span)] all_text_full = all_text_list
Still having some issues, that fixes the error, but prints the whole text on every image. sorry :(
Update! I figured out a solution/workaround without editing the original text after the test where it says "span= 6" this value can be edited to set the number of words that appear on the screen. You can use a hyphen "-" to take the place of the word so if I have the span set to 8 and the sentences I want are "The cat hopped off the couch" "The cat landed on the floor with grace" I can make them print the line separately by doing "- the cat hopped off the couch-" "The cat landed on the floor with grace".
not a perfect fix, but it works for small stories!
it worked for me yesterday, i tried to change the story again and it does not work anymore. I get the same error: 73 model.text = " ".join(words[:span]) NameError: name 'words' is not defined Even bigger problem is that I changed it back and now it wont work in anyway. Anybody has an ideea?
there is multiple problems with this code, as if your sentence is longer than width, you also need to add some changes.
Hi, excellent work, I'm looking to set the span dinamically by the length of a sentence, for example this verse:
The moon has a face like the clock in the hall, She shines on thieves on the garden wall, On streets and fields and harbour quays, And birdies asleep in the forks of the trees,
Could be possible? thank you very much