Spaces:
Sleeping
Sleeping
Sora Avralt-Od
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,12 +76,14 @@ def generate_response(user_query, relevant_segment):
|
|
| 76 |
model="gpt-4o",
|
| 77 |
messages=messages,
|
| 78 |
max_tokens=300,
|
| 79 |
-
temperature=0.
|
| 80 |
top_p=1,
|
| 81 |
frequency_penalty=0.5,
|
| 82 |
presence_penalty=0.5
|
|
|
|
| 83 |
)
|
| 84 |
-
|
|
|
|
| 85 |
# Extract the response text
|
| 86 |
output_text = response['choices'][0]['message']['content'].strip()
|
| 87 |
|
|
|
|
| 76 |
model="gpt-4o",
|
| 77 |
messages=messages,
|
| 78 |
max_tokens=300,
|
| 79 |
+
temperature=0.7,
|
| 80 |
top_p=1,
|
| 81 |
frequency_penalty=0.5,
|
| 82 |
presence_penalty=0.5
|
| 83 |
+
stop=None
|
| 84 |
)
|
| 85 |
+
return response.choices[0].text.strip()
|
| 86 |
+
|
| 87 |
# Extract the response text
|
| 88 |
output_text = response['choices'][0]['message']['content'].strip()
|
| 89 |
|