Pavankalyan commited on
Commit
a6bf372
1 Parent(s): 9f47b76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,6 +1,10 @@
1
  import gradio as gr
2
  import pandas as pd
3
  from retrieval import *
 
 
 
 
4
 
5
  df = pd.read_csv("Responses.csv")
6
  text = list(df["text"].values)
@@ -18,7 +22,7 @@ demo = gr.Interface(
18
  outputs=["text","text"],
19
  allow_flagging = "manual",
20
  flagging_options = ["1","2","None"],
21
- flagging_dir = "Questions"
22
  )
23
  demo.launch()
24
 
 
1
  import gradio as gr
2
  import pandas as pd
3
  from retrieval import *
4
+ import os
5
+
6
+ HF_TOKEN = os.getenv('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')
7
+ hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "chitti_data")
8
 
9
  df = pd.read_csv("Responses.csv")
10
  text = list(df["text"].values)
 
22
  outputs=["text","text"],
23
  allow_flagging = "manual",
24
  flagging_options = ["1","2","None"],
25
+ flagging_callback=hf_writer
26
  )
27
  demo.launch()
28