Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ tokenizer.pad_token = tokenizer.eos_token
|
|
16 |
|
17 |
MAX_INPUT_TOKEN_LENGTH = 10000
|
18 |
|
19 |
-
def generate_response(input_text, temperature=0.
|
20 |
input_ids = tokenizer.encode(input_text, return_tensors='pt').to(model.device)
|
21 |
|
22 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
@@ -65,7 +65,7 @@ def main():
|
|
65 |
st.write("Archivo CSV cargado exitosamente:")
|
66 |
st.write(df.head())
|
67 |
|
68 |
-
initial_prompt = f"
|
69 |
st.write(f"Query: {query}")
|
70 |
st.write(f"Prompt inicial: {initial_prompt}")
|
71 |
|
|
|
16 |
|
17 |
MAX_INPUT_TOKEN_LENGTH = 10000
|
18 |
|
19 |
+
def generate_response(input_text, temperature=0.5, max_new_tokens=100):
|
20 |
input_ids = tokenizer.encode(input_text, return_tensors='pt').to(model.device)
|
21 |
|
22 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
|
|
65 |
st.write("Archivo CSV cargado exitosamente:")
|
66 |
st.write(df.head())
|
67 |
|
68 |
+
initial_prompt = f"I have a list of job titles: {job_titles}. Please extract and return only the first job title from this list without repeating."
|
69 |
st.write(f"Query: {query}")
|
70 |
st.write(f"Prompt inicial: {initial_prompt}")
|
71 |
|