Spaces:
Sleeping
Sleeping
Asankhaya Sharma
commited on
Commit
·
a3e25d7
1
Parent(s):
77de078
app.py
CHANGED
@@ -32,10 +32,10 @@ def infer(input_ids, bad_words_ids, max_tokens, temperature, top_k, top_p):
|
|
32 |
|
33 |
return output_sequences
|
34 |
|
35 |
-
default_value = "We are building the world's first"
|
36 |
|
37 |
#prompts
|
38 |
-
st.title("Write with
|
39 |
st.write("This is a LLM that was fine-tuned on a dataset of investment memos to help you generate your next pitch.")
|
40 |
|
41 |
sent = st.text_area("Text", default_value)
|
@@ -50,7 +50,7 @@ top_p = st.sidebar.slider("Top-p", min_value = 0.0, max_value=1.0, step = 0.05,
|
|
50 |
encoded_prompt = tokenizer.encode(tokenizer.eos_token+sent, max_length=1024, return_tensors="pt", truncation=True)
|
51 |
|
52 |
# get tokens of words that should not be generated
|
53 |
-
bad_words_ids = tokenizer(["confidential", "angel.co", "angellist.com"], add_special_tokens=False).input_ids
|
54 |
|
55 |
if encoded_prompt.size()[-1] == 0:
|
56 |
input_ids = None
|
|
|
32 |
|
33 |
return output_sequences
|
34 |
|
35 |
+
default_value = "We are building the world's first "
|
36 |
|
37 |
#prompts
|
38 |
+
st.title("Write with a VC 🦄")
|
39 |
st.write("This is a LLM that was fine-tuned on a dataset of investment memos to help you generate your next pitch.")
|
40 |
|
41 |
sent = st.text_area("Text", default_value)
|
|
|
50 |
encoded_prompt = tokenizer.encode(tokenizer.eos_token+sent, max_length=1024, return_tensors="pt", truncation=True)
|
51 |
|
52 |
# get tokens of words that should not be generated
|
53 |
+
bad_words_ids = tokenizer(["confidential", "angel.co", "angellist.com", "angellist"], add_special_tokens=False).input_ids
|
54 |
|
55 |
if encoded_prompt.size()[-1] == 0:
|
56 |
input_ids = None
|