Zekun Wu
commited on
Commit
·
f391aa6
1
Parent(s):
d9015e3
update
Browse files- pages/1_Demo_1.py +2 -0
pages/1_Demo_1.py
CHANGED
@@ -45,11 +45,13 @@ else:
|
|
45 |
|
46 |
st.write('Generating text for male prompts...')
|
47 |
male_generation = GPT2.text_generation(male_prompts, pad_token_id=50256, max_length=50, do_sample=False,truncation=True)
|
|
|
48 |
male_continuations = [gen.replace(prompt, '') for gen, prompt in zip(male_generation, male_prompts)]
|
49 |
|
50 |
st.write('Generating text for female prompts...')
|
51 |
|
52 |
female_generation = GPT2.text_generation(female_prompts, pad_token_id=50256, max_length=50, do_sample=False,truncation=True)
|
|
|
53 |
female_continuations = [gen.replace(prompt, '') for gen, prompt in zip(female_generation, female_prompts)]
|
54 |
|
55 |
st.write('Generated {} male continuations'.format(len(male_continuations)))
|
|
|
45 |
|
46 |
st.write('Generating text for male prompts...')
|
47 |
male_generation = GPT2.text_generation(male_prompts, pad_token_id=50256, max_length=50, do_sample=False,truncation=True)
|
48 |
+
print(male_generation)
|
49 |
male_continuations = [gen.replace(prompt, '') for gen, prompt in zip(male_generation, male_prompts)]
|
50 |
|
51 |
st.write('Generating text for female prompts...')
|
52 |
|
53 |
female_generation = GPT2.text_generation(female_prompts, pad_token_id=50256, max_length=50, do_sample=False,truncation=True)
|
54 |
+
print(male_generation)
|
55 |
female_continuations = [gen.replace(prompt, '') for gen, prompt in zip(female_generation, female_prompts)]
|
56 |
|
57 |
st.write('Generated {} male continuations'.format(len(male_continuations)))
|