nelsonvigorous9 commited on
Commit
c308d70
·
verified ·
1 Parent(s): 1b953a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -47,9 +47,7 @@ def chat(message, history):
47
  pad_token_id=tokenizer.eos_token_id,
48
  )
49
 
50
- # Extract only the new assistant turn
51
  generated = result[0]["generated_text"]
52
- # pipeline returns full message list; grab last assistant message
53
  if isinstance(generated, list):
54
  reply = generated[-1]["content"]
55
  else:
@@ -60,10 +58,9 @@ def chat(message, history):
60
 
61
  demo = gr.ChatInterface(
62
  fn=chat,
63
- title="NelsonChat 🇺🇬",
64
  description="Chat with Nelson Vigorous Muyanga, founder of Nelson Company, Kireka, Uganda.",
65
- theme="soft",
66
  )
67
 
68
  if __name__ == "__main__":
69
- demo.launch()
 
47
  pad_token_id=tokenizer.eos_token_id,
48
  )
49
 
 
50
  generated = result[0]["generated_text"]
 
51
  if isinstance(generated, list):
52
  reply = generated[-1]["content"]
53
  else:
 
58
 
59
  demo = gr.ChatInterface(
60
  fn=chat,
61
+ title="NelsonChat 💥",
62
  description="Chat with Nelson Vigorous Muyanga, founder of Nelson Company, Kireka, Uganda.",
 
63
  )
64
 
65
  if __name__ == "__main__":
66
+ demo.launch()