Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -127,7 +127,7 @@ def set_openai_api_key(api_key):
|
|
127 |
if api_key and api_key.startswith("sk-") and len(api_key) > 50:
|
128 |
openai.api_key = api_key
|
129 |
|
130 |
-
def get_response_from_openai(prompt, model="gpt-3.5-turbo", max_output_tokens=
|
131 |
messages = [{"role": "assistant", "content": prompt}]
|
132 |
response = openai.ChatCompletion.create(
|
133 |
model=model,
|
@@ -154,7 +154,7 @@ def evaluate(
|
|
154 |
top_p=0.75,
|
155 |
top_k=40,
|
156 |
num_beams=4,
|
157 |
-
max_new_tokens=
|
158 |
**kwargs,
|
159 |
):
|
160 |
prompt_0shot = _INSTRUCTION + "\n" + _add_markup(table) + "\n" + "Q: " + question + "\n" + "A:"
|
|
|
127 |
if api_key and api_key.startswith("sk-") and len(api_key) > 50:
|
128 |
openai.api_key = api_key
|
129 |
|
130 |
+
def get_response_from_openai(prompt, model="gpt-3.5-turbo", max_output_tokens=256):
|
131 |
messages = [{"role": "assistant", "content": prompt}]
|
132 |
response = openai.ChatCompletion.create(
|
133 |
model=model,
|
|
|
154 |
top_p=0.75,
|
155 |
top_k=40,
|
156 |
num_beams=4,
|
157 |
+
max_new_tokens=256,
|
158 |
**kwargs,
|
159 |
):
|
160 |
prompt_0shot = _INSTRUCTION + "\n" + _add_markup(table) + "\n" + "Q: " + question + "\n" + "A:"
|