momondi commited on
Commit
c2e446b
·
verified ·
1 Parent(s): 37976d8

updated the app.py so as to display the examples

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -101,7 +101,7 @@ from langchain_core.runnables import RunnablePassthrough
101
  df = pd.read_json("./tourisme_chatbot.json")
102
 
103
  # Randomly sample a portion of the dataset (e.g., 30% of the data)
104
- sampled_df = df.sample(frac=0.1, random_state=42) # Adjust the fraction as needed
105
 
106
  context_data = []
107
  for i in range(len(sampled_df)): # Use the sampled data
@@ -170,8 +170,9 @@ demo = gr.Interface(
170
  fn=rag_memory_stream,
171
  inputs="text",
172
  outputs="text",
 
173
  allow_flagging="never",
174
  )
175
 
176
  if __name__ == '__main__':
177
- demo.launch()
 
101
  df = pd.read_json("./tourisme_chatbot.json")
102
 
103
  # Randomly sample a portion of the dataset (e.g., 30% of the data)
104
+ sampled_df = df.sample(frac=0.2, random_state=42) # Adjust the fraction as needed
105
 
106
  context_data = []
107
  for i in range(len(sampled_df)): # Use the sampled data
 
170
  fn=rag_memory_stream,
171
  inputs="text",
172
  outputs="text",
173
+ examples = examples
174
  allow_flagging="never",
175
  )
176
 
177
  if __name__ == '__main__':
178
+ demo.launch(share=True)