Spaces:
Sleeping
Sleeping
Alexander Hux
commited on
Commit
·
cc25147
1
Parent(s):
4afa527
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,9 +30,9 @@ def CustomChatGPT(user_input):
|
|
| 30 |
response = openai.ChatCompletion.create(
|
| 31 |
model="gpt-3.5-turbo",
|
| 32 |
messages=conversation,
|
| 33 |
-
max_tokens=
|
| 34 |
temperature=0.7)
|
| 35 |
-
|
| 36 |
print(f"Received error from OpenAI: {e}")
|
| 37 |
return "I'm sorry, but I'm unable to generate a response at this time."
|
| 38 |
|
|
@@ -46,7 +46,7 @@ def CustomChatGPT(user_input):
|
|
| 46 |
interface = gr.Interface(fn=CustomChatGPT,
|
| 47 |
inputs="textbox",
|
| 48 |
outputs="textbox",
|
| 49 |
-
title="
|
| 50 |
-
description="
|
| 51 |
|
| 52 |
interface.launch()
|
|
|
|
| 30 |
response = openai.ChatCompletion.create(
|
| 31 |
model="gpt-3.5-turbo",
|
| 32 |
messages=conversation,
|
| 33 |
+
max_tokens=2000,
|
| 34 |
temperature=0.7)
|
| 35 |
+
except openai.error.RequestError as e:
|
| 36 |
print(f"Received error from OpenAI: {e}")
|
| 37 |
return "I'm sorry, but I'm unable to generate a response at this time."
|
| 38 |
|
|
|
|
| 46 |
interface = gr.Interface(fn=CustomChatGPT,
|
| 47 |
inputs="textbox",
|
| 48 |
outputs="textbox",
|
| 49 |
+
title="Coding Assistant AL",
|
| 50 |
+
description="Coding Quantum Assistant, Trained on all relevant languages as of June 2, 2023. Developed by A. Leschik.")
|
| 51 |
|
| 52 |
interface.launch()
|