burman-ai commited on
Commit
c448ca4
·
verified ·
1 Parent(s): 6e87c9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -14,8 +14,7 @@ print("OpenAI client initialized.")
14
  def respond(
15
  message,
16
  history: list[tuple[str, str]],
17
- system_message,
18
- custom_model
19
  ):
20
  print(f"Received message: {message}")
21
  print(f"History: {history}")
@@ -31,7 +30,7 @@ def respond(
31
 
32
  messages.append({"role": "user", "content": message})
33
 
34
- model_to_use = custom_model.strip() if custom_model.strip() != "" else "meta-llama/Llama-3.1-8B-Instruct"
35
 
36
  response = ""
37
 
@@ -51,15 +50,8 @@ def respond(
51
 
52
  chatbot = gr.Chatbot(height=600, show_copy_button=True, placeholder="ChatGPT is initializing...", likeable=True, layout="panel")
53
 
54
- system_message_box = gr.Label(value="System Message")
55
- custom_model_box = gr.Textbox(value="meta-llama/Llama-3.2-3B-Instruct", label="AI Mode is ")
56
-
57
  demo = gr.ChatInterface(
58
  fn=respond,
59
- additional_inputs=[
60
- system_message_box,
61
- custom_model_box,
62
- ],
63
  fill_height=True,
64
  chatbot=chatbot,
65
  theme="Nymbo/Nymbo_Theme",
 
14
  def respond(
15
  message,
16
  history: list[tuple[str, str]],
17
+ system_message
 
18
  ):
19
  print(f"Received message: {message}")
20
  print(f"History: {history}")
 
30
 
31
  messages.append({"role": "user", "content": message})
32
 
33
+ model_to_use = "meta-llama/Llama-3.1-8B-Instruct"
34
 
35
  response = ""
36
 
 
50
 
51
  chatbot = gr.Chatbot(height=600, show_copy_button=True, placeholder="ChatGPT is initializing...", likeable=True, layout="panel")
52
 
 
 
 
53
  demo = gr.ChatInterface(
54
  fn=respond,
 
 
 
 
55
  fill_height=True,
56
  chatbot=chatbot,
57
  theme="Nymbo/Nymbo_Theme",