johann22 commited on
Commit
fc05708
1 Parent(s): 0dbf789

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -21,6 +21,7 @@ agents =[
21
  def generate(
22
  prompt, history, sys_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, agent_name=agents[0],
23
  ):
 
24
  if agent_name == "WEB_DEV":
25
  agent = prompt.WEB_DEV
26
  if agent_name == "AI_SYSTEM_PROMPT":
@@ -110,14 +111,13 @@ examples=[["I'm planning a vacation to Japan. Can you suggest a one-week itinera
110
  ["What are some unique features of Rust that make it stand out compared to other systems programming languages like C++?", None, None, None, None, None,],
111
  ]
112
 
113
- with gr.Blocks() as iface:
114
- gr.ChatInterface(
115
- fn=generate,
116
- chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
117
- additional_inputs=additional_inputs,
118
- title="Mixtral 46.7B",
119
- examples=examples,
120
- concurrency_limit=20,
121
- )
122
- iface.launch(show_api=False)
123
 
 
21
  def generate(
22
  prompt, history, sys_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, agent_name=agents[0],
23
  ):
24
+ agent=prompt.AI_SYSTEM_PROMPT
25
  if agent_name == "WEB_DEV":
26
  agent = prompt.WEB_DEV
27
  if agent_name == "AI_SYSTEM_PROMPT":
 
111
  ["What are some unique features of Rust that make it stand out compared to other systems programming languages like C++?", None, None, None, None, None,],
112
  ]
113
 
114
+
115
+ gr.ChatInterface(
116
+ fn=generate,
117
+ chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
118
+ additional_inputs=additional_inputs,
119
+ title="Mixtral 46.7B",
120
+ examples=examples,
121
+ concurrency_limit=20,
122
+ ).launch(show_api=False)
 
123