atwine Devin commited on
Commit
b801d99
·
1 Parent(s): bf814b4

Fix model not supported on Novita; fix Gradio 6 theme deprecation warning

Browse files

- Switch model from Llama-3.1-70B-Instruct (not on Novita) to
Llama-3.3-70B-Instruct (confirmed on Novita; newer/better model)
- Move theme= from gr.Blocks() to demo.launch() per Gradio 6 API
(gr.blocks.py:873 confirms launch() accepts theme param)

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -459,7 +459,7 @@ def respond(message, history):
459
  for attempt in range(3):
460
  try:
461
  response = client.chat_completion(
462
- model="meta-llama/Llama-3.1-70B-Instruct",
463
  messages=messages,
464
  max_tokens=512,
465
  )
@@ -507,7 +507,7 @@ textbox = gr.Textbox(
507
  scale=7,
508
  )
509
 
510
- with gr.Blocks(theme=theme, title="Sanyu — Peer Support Chatbot") as demo:
511
  gr.ChatInterface(
512
  fn=respond,
513
  chatbot=chatbot,
@@ -533,4 +533,4 @@ with gr.Blocks(theme=theme, title="Sanyu — Peer Support Chatbot") as demo:
533
  cache_examples=False,
534
  )
535
 
536
- demo.launch()
 
459
  for attempt in range(3):
460
  try:
461
  response = client.chat_completion(
462
+ model="meta-llama/Llama-3.3-70B-Instruct", # 3.1-70B not on Novita; 3.3-70B is confirmed available
463
  messages=messages,
464
  max_tokens=512,
465
  )
 
507
  scale=7,
508
  )
509
 
510
+ with gr.Blocks(title="Sanyu — Peer Support Chatbot") as demo: # theme moved to launch() per Gradio 6
511
  gr.ChatInterface(
512
  fn=respond,
513
  chatbot=chatbot,
 
533
  cache_examples=False,
534
  )
535
 
536
+ demo.launch(theme=theme)