richardr1126 commited on
Commit
d119dc4
1 Parent(s): 89ed098

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -74,7 +74,10 @@ def bot(input_message: str, temperature=0.1, top_p=0.9, top_k=0, repetition_pena
74
  for new_text in streamer:
75
  partial_text += new_text
76
 
77
- return partial_text
 
 
 
78
 
79
  gradio_interface = gr.Interface(
80
  fn=bot,
 
74
  for new_text in streamer:
75
  partial_text += new_text
76
 
77
+ # Split the text by "|", and get the last element in the list which should be the final query
78
+ final_query = partial_text.split("|")[-1].strip()
79
+ return final_query
80
+
81
 
82
  gradio_interface = gr.Interface(
83
  fn=bot,