TIMBOVILL commited on
Commit
73cfb02
·
verified ·
1 Parent(s): 0089e16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
4
  from groq import Groq
5
 
6
  client = Groq(
7
- api_key = os.environ.get("Groq_Api_Key")
8
  )
9
 
10
  def create_history_messages(history):
@@ -19,7 +19,7 @@ def generate_response(prompt, history, model, temperature, max_tokens, top_p, se
19
 
20
  if seed == 0:
21
  seed = random.randint(1, 100000)
22
-
23
  stream = client.chat.completions.create(
24
  messages=messages,
25
  model=model,
@@ -82,6 +82,8 @@ interface = gr.ChatInterface(
82
  theme=theme
83
  )
84
 
85
- top_bar_component = gr.HTML(top_bar_html)
 
 
86
 
87
- gr.Blocks().with_style(theme).add(top_bar_component).add(interface).launch()
 
4
  from groq import Groq
5
 
6
  client = Groq(
7
+ api_key=os.environ.get("Groq_Api_Key")
8
  )
9
 
10
  def create_history_messages(history):
 
19
 
20
  if seed == 0:
21
  seed = random.randint(1, 100000)
22
+
23
  stream = client.chat.completions.create(
24
  messages=messages,
25
  model=model,
 
82
  theme=theme
83
  )
84
 
85
+ with gr.Blocks(theme=theme) as demo:
86
+ gr.HTML(top_bar_html)
87
+ interface.render()
88
 
89
+ demo.launch()