yuntian-deng commited on
Commit
ae3ecf1
·
verified ·
1 Parent(s): 47a10f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,7 +6,7 @@ import requests
6
  import random
7
 
8
 
9
- MODEL = "gpt-4o-mini"
10
  API_URL = os.getenv("API_URL")
11
  DISABLED = os.getenv("DISABLED") == 'True'
12
  OPENAI_API_KEYS = os.getenv("OPENAI_API_KEYS").split(',')
@@ -113,7 +113,7 @@ def predict(inputs, top_p, temperature, chat_counter, chatbot, history, request:
113
  def reset_textbox():
114
  return gr.update(value='', interactive=False), gr.update(interactive=False)
115
 
116
- title = """<h1 align="center">GPT-4o Mini: Research Preview (Short-Term Availability)</h1>"""
117
  if DISABLED:
118
  title = """<h1 align="center" style="color:red">This app has reached OpenAI's usage limit. Please check back tomorrow.</h1>"""
119
  description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
@@ -133,7 +133,7 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
133
  #chatbot {height: 520px; overflow: auto;}""",
134
  theme=theme) as demo:
135
  gr.HTML(title)
136
- 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.</h3>""")
137
 
138
  #gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPT4?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
139
  with gr.Column(elem_id = "col_container", visible=False) as main_block:
 
6
  import random
7
 
8
 
9
+ MODEL = "gpt-4.1-mini"
10
  API_URL = os.getenv("API_URL")
11
  DISABLED = os.getenv("DISABLED") == 'True'
12
  OPENAI_API_KEYS = os.getenv("OPENAI_API_KEYS").split(',')
 
113
  def reset_textbox():
114
  return gr.update(value='', interactive=False), gr.update(interactive=False)
115
 
116
+ title = """<h1 align="center">GPT-4.1 mini: Research Preview (Short-Term Availability)</h1>"""
117
  if DISABLED:
118
  title = """<h1 align="center" style="color:red">This app has reached OpenAI's usage limit. Please check back tomorrow.</h1>"""
119
  description = """Language models can be conditioned to act like dialogue agents through a conversational prompt that typically takes the form:
 
133
  #chatbot {height: 520px; overflow: auto;}""",
134
  theme=theme) as demo:
135
  gr.HTML(title)
136
+ gr.HTML("""<h3 align="center">This app provides you full access to GPT-4.1 mini (1M token limit). You don't need any OPENAI API key.</h3>""")
137
 
138
  #gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPT4?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
139
  with gr.Column(elem_id = "col_container", visible=False) as main_block: