Upload app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ if __name__ == '__main__':
|
|
11 |
#openai.api_key = os.environ['API']
|
12 |
client = OpenAI(api_key=os.environ['API'])
|
13 |
|
14 |
-
system_message = {"role": "system", "content": "You are ChatGPT, a large language model trained by OpenAI
|
15 |
|
16 |
with gr.Blocks(css="footer {visibility: hidden}", title = 'Hello, Yoda.') as demo:
|
17 |
gr.Markdown("""<h1><center>Hello, Yoda.</center></h1>""")
|
@@ -26,7 +26,7 @@ if __name__ == '__main__':
|
|
26 |
def user(user_message, history):
|
27 |
return "", history + [[user_message, None]]
|
28 |
|
29 |
-
def bot(history, messages_history, model_name = 'gpt-
|
30 |
user_message = history[-1][0]
|
31 |
now = datetime.datetime.now()
|
32 |
if now.year == 2024 and now.month == 2:
|
|
|
11 |
#openai.api_key = os.environ['API']
|
12 |
client = OpenAI(api_key=os.environ['API'])
|
13 |
|
14 |
+
system_message = {"role": "system", "content": "You are ChatGPT, a large language model trained by OpenAI. Your answer should be as detailed as possible."}
|
15 |
|
16 |
with gr.Blocks(css="footer {visibility: hidden}", title = 'Hello, Yoda.') as demo:
|
17 |
gr.Markdown("""<h1><center>Hello, Yoda.</center></h1>""")
|
|
|
26 |
def user(user_message, history):
|
27 |
return "", history + [[user_message, None]]
|
28 |
|
29 |
+
def bot(history, messages_history, model_name = 'gpt-4o'):
|
30 |
user_message = history[-1][0]
|
31 |
now = datetime.datetime.now()
|
32 |
if now.year == 2024 and now.month == 2:
|