dxnxk commited on
Commit
76b40e0
·
1 Parent(s): 20d4b20

added better formatting

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -63,10 +63,15 @@ Context:
63
  ):
64
  token = message.choices[0].delta.content
65
  response["content"] += token
66
- yield response
 
67
 
68
-
69
- demo = gr.ChatInterface(respond, type="messages", render_markdown=True)
 
 
 
 
70
 
71
  if __name__ == "__main__":
72
  demo.launch()
 
63
  ):
64
  token = message.choices[0].delta.content
65
  response["content"] += token
66
+ formatted = response["content"].replace("\n", "\n\n")
67
+ yield {"role": "assistant", "content": formatted}
68
 
69
+ demo = gr.ChatInterface(
70
+ respond, type="messages",
71
+ chatbot=gr.Chatbot(render_markdown=True),
72
+ title="Tariff Code RAG Bot",
73
+ description="Ask questions about tariff codes using natural language."
74
+ )
75
 
76
  if __name__ == "__main__":
77
  demo.launch()