Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def generate_response(input_text):
|
|
21 |
output_sequences = model.generate(
|
22 |
input_ids=inputs['input_ids'],
|
23 |
attention_mask=inputs['attention_mask'],
|
24 |
-
max_length=
|
25 |
temperature=0.7,
|
26 |
top_k=50,
|
27 |
top_p=0.95,
|
@@ -45,7 +45,7 @@ model_name = 'elapt1c/ElapticAI-1a'
|
|
45 |
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
46 |
model = GPT2LMHeadModel.from_pretrained(model_name)
|
47 |
|
48 |
-
st.title("
|
49 |
|
50 |
# Initialize chat history
|
51 |
if "messages" not in st.session_state:
|
|
|
21 |
output_sequences = model.generate(
|
22 |
input_ids=inputs['input_ids'],
|
23 |
attention_mask=inputs['attention_mask'],
|
24 |
+
max_length=50, # Adjusted max_length
|
25 |
temperature=0.7,
|
26 |
top_k=50,
|
27 |
top_p=0.95,
|
|
|
45 |
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
46 |
model = GPT2LMHeadModel.from_pretrained(model_name)
|
47 |
|
48 |
+
st.title("ElapticAI-1a-xchat")
|
49 |
|
50 |
# Initialize chat history
|
51 |
if "messages" not in st.session_state:
|