Jiangxz commited on
Commit
f1891ea
·
verified ·
1 Parent(s): 0ac89f0

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -20,7 +20,7 @@ def create_client(api_key=None):
20
  if api_key:
21
  openai.api_key = api_key
22
  else:
23
- openai.api_key = os.getenv("YOUR_API_TOKEN")
24
  return openai.OpenAI(api_key=openai.api_key, base_url=API_BASE)
25
 
26
  def chat_with_ai(message, chat_history, system_prompt):
@@ -148,6 +148,15 @@ custom_css = """
148
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
149
  margin-bottom: -5px !important;
150
  }
 
 
 
 
 
 
 
 
 
151
  .input-background {
152
  background-color: #ffe0b2 !important;
153
  padding: 15px !important;
@@ -202,7 +211,7 @@ custom_css = """
202
  """
203
 
204
  with gr.Blocks(theme=gr.themes.Monochrome(), css=custom_css) as demo:
205
- gr.Markdown("# 👹 Multi-Chain Reasoning using Llama-3.1-405B-Instruct. Deployed by 江信宗", elem_classes="center-aligned")
206
  chatbot = gr.Chatbot(
207
  label="Chat",
208
  show_label=False,
 
20
  if api_key:
21
  openai.api_key = api_key
22
  else:
23
+ openai.api_key = os.getenv("YOUR_API_KEY")
24
  return openai.OpenAI(api_key=openai.api_key, base_url=API_BASE)
25
 
26
  def chat_with_ai(message, chat_history, system_prompt):
 
148
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
149
  margin-bottom: -5px !important;
150
  }
151
+ .gr-input, .gr-box, .gr-dropdown {
152
+ border-radius: 10px !important;
153
+ border: 2px solid #ff4081 !important;
154
+ margin: 0 !important;
155
+ }
156
+ .gr-input:focus, .gr-box:focus, .gr-dropdown:focus {
157
+ border-color: #f50057 !important;
158
+ box-shadow: 0 0 0 2px rgba(245,0,87,0.2) !important;
159
+ }
160
  .input-background {
161
  background-color: #ffe0b2 !important;
162
  padding: 15px !important;
 
211
  """
212
 
213
  with gr.Blocks(theme=gr.themes.Monochrome(), css=custom_css) as demo:
214
+ gr.Markdown("# 🏹 Multi-Chain Reasoning using Llama-3.1-405B-Instruct. Deployed by 江信宗 🏹", elem_classes="center-aligned")
215
  chatbot = gr.Chatbot(
216
  label="Chat",
217
  show_label=False,