yuntian-deng commited on
Commit
62335f3
1 Parent(s): f1f9b53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,7 +4,7 @@ import sys
4
  import json
5
  import requests
6
 
7
- MODEL = "gpt-3.5-turbo"
8
  API_URL = os.getenv("API_URL")
9
  DISABLED = os.getenv("DISABLED") == 'True'
10
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
@@ -119,7 +119,7 @@ def predict(inputs, top_p, temperature, chat_counter, chatbot, history, request:
119
  def reset_textbox():
120
  return gr.update(value='', interactive=False), gr.update(interactive=False)
121
 
122
- title = """<h1 align="center">GPT-3.5 Chatbot</h1>"""
123
  if DISABLED:
124
  title = """<h1 align="center" style="color:red">This app has reached OpenAI's usage limit. We are currently requesting an increase in our quota. Please check back in a few days.</h1>"""
125
  description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
@@ -130,7 +130,7 @@ User: <utterance>
130
  Assistant: <utterance>
131
  ...
132
  ```
133
- In this app, you can explore the outputs of a gpt-3.5 LLM.
134
  """
135
 
136
  theme = gr.themes.Default(primary_hue="green")
@@ -139,7 +139,7 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
139
  #chatbot {height: 520px; overflow: auto;}""",
140
  theme=theme) as demo:
141
  gr.HTML(title)
142
- gr.HTML("""<h3 align="center">This app provides you full access to GPT-3.5 (4096 token limit). You don't need any OPENAI API key.</h1>""")
143
  #gr.HTML('''<center><a href="https://huggingface.co/spaces/yuntian-deng/ChatGPT?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
144
  with gr.Column(elem_id = "col_container", visible=False) as main_block:
145
  #API Key is provided by OpenAI
 
4
  import json
5
  import requests
6
 
7
+ MODEL = "gpt-4o-mini"
8
  API_URL = os.getenv("API_URL")
9
  DISABLED = os.getenv("DISABLED") == 'True'
10
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
 
119
  def reset_textbox():
120
  return gr.update(value='', interactive=False), gr.update(interactive=False)
121
 
122
+ title = """<h1 align="center">GPT-4o mini Chatbot</h1>"""
123
  if DISABLED:
124
  title = """<h1 align="center" style="color:red">This app has reached OpenAI's usage limit. We are currently requesting an increase in our quota. Please check back in a few days.</h1>"""
125
  description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
 
130
  Assistant: <utterance>
131
  ...
132
  ```
133
+ In this app, you can explore the outputs of a gpt-4o mini LLM.
134
  """
135
 
136
  theme = gr.themes.Default(primary_hue="green")
 
139
  #chatbot {height: 520px; overflow: auto;}""",
140
  theme=theme) as demo:
141
  gr.HTML(title)
142
+ gr.HTML("""<h3 align="center">This app provides you full access to GPT-4o mini (128K token limit). You don't need any OPENAI API key.</h1>""")
143
  #gr.HTML('''<center><a href="https://huggingface.co/spaces/yuntian-deng/ChatGPT?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
144
  with gr.Column(elem_id = "col_container", visible=False) as main_block:
145
  #API Key is provided by OpenAI