nanom commited on
Commit
c780d56
1 Parent(s): b44c74c

Error due to saving logs eliminated

Browse files
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🐠
4
  colorFrom: red
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 3.12.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
4
  colorFrom: red
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 3.43.2
8
  app_file: app.py
9
  pinned: false
10
  license: mit
interfaces/interface_biasPhrase.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import pandas as pd
3
  from tool_info import TOOL_INFO
4
- from modules.module_logsManager import HuggingFaceDatasetSaver
5
  from modules.module_connection import PhraseBiasExplorerConnector
6
 
7
 
@@ -19,10 +19,10 @@ def interface(
19
  from examples.examples_en import examples_sesgos_frases
20
 
21
  # --- Init logs ---
22
- log_callback = HuggingFaceDatasetSaver(
23
- available_logs=available_logs,
24
- dataset_name=f"logs_edia_lmodels_{lang}"
25
- )
26
 
27
  # --- Init vars ---
28
  connector = PhraseBiasExplorerConnector(
@@ -130,21 +130,21 @@ def interface(
130
  )
131
 
132
  # --- Logs ---
133
- save_field = [sent, word_list]
134
- log_callback.setup(
135
- components=save_field,
136
- flagging_dir="logs_phrase_bias"
137
- )
138
 
139
- btn.click(
140
- fn=lambda *args: log_callback.flag(
141
- flag_data=args,
142
- flag_option="phrase_bias",
143
- username="vialibre"
144
- ),
145
- inputs=save_field,
146
- outputs=None,
147
- preprocess=False
148
- )
149
 
150
  return iface
 
1
  import gradio as gr
2
  import pandas as pd
3
  from tool_info import TOOL_INFO
4
+ # from modules.module_logsManager import HuggingFaceDatasetSaver
5
  from modules.module_connection import PhraseBiasExplorerConnector
6
 
7
 
 
19
  from examples.examples_en import examples_sesgos_frases
20
 
21
  # --- Init logs ---
22
+ # log_callback = HuggingFaceDatasetSaver(
23
+ # available_logs=available_logs,
24
+ # dataset_name=f"logs_edia_lmodels_{lang}"
25
+ # )
26
 
27
  # --- Init vars ---
28
  connector = PhraseBiasExplorerConnector(
 
130
  )
131
 
132
  # --- Logs ---
133
+ # save_field = [sent, word_list]
134
+ # log_callback.setup(
135
+ # components=save_field,
136
+ # flagging_dir="logs_phrase_bias"
137
+ # )
138
 
139
+ # btn.click(
140
+ # fn=lambda *args: log_callback.flag(
141
+ # flag_data=args,
142
+ # flag_option="phrase_bias",
143
+ # username="vialibre"
144
+ # ),
145
+ # inputs=save_field,
146
+ # outputs=None,
147
+ # preprocess=False
148
+ # )
149
 
150
  return iface
interfaces/interface_crowsPairs.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import pandas as pd
3
  from tool_info import TOOL_INFO
4
- from modules.module_logsManager import HuggingFaceDatasetSaver
5
  from modules.module_connection import CrowsPairsExplorerConnector
6
 
7
 
@@ -19,10 +19,10 @@ def interface(
19
  from examples.examples_en import examples_crows_pairs
20
 
21
  # --- Init logs ---
22
- log_callback = HuggingFaceDatasetSaver(
23
- available_logs=available_logs,
24
- dataset_name=f"logs_edia_lmodels_{lang}"
25
- )
26
 
27
  # --- Init vars ---
28
  connector = CrowsPairsExplorerConnector(
@@ -118,21 +118,21 @@ def interface(
118
  )
119
 
120
  # --- Logs ---
121
- save_field = [sent0, sent1, sent2, sent3, sent4, sent5]
122
- log_callback.setup(
123
- components=save_field,
124
- flagging_dir=f"logs_crows_pairs"
125
- )
126
 
127
- btn.click(
128
- fn=lambda *args: log_callback.flag(
129
- flag_data=args,
130
- flag_option="crows_pairs",
131
- username="vialibre"
132
- ),
133
- inputs=save_field,
134
- outputs=None,
135
- preprocess=False
136
- )
137
 
138
  return iface
 
1
  import gradio as gr
2
  import pandas as pd
3
  from tool_info import TOOL_INFO
4
+ # from modules.module_logsManager import HuggingFaceDatasetSaver
5
  from modules.module_connection import CrowsPairsExplorerConnector
6
 
7
 
 
19
  from examples.examples_en import examples_crows_pairs
20
 
21
  # --- Init logs ---
22
+ # log_callback = HuggingFaceDatasetSaver(
23
+ # available_logs=available_logs,
24
+ # dataset_name=f"logs_edia_lmodels_{lang}"
25
+ # )
26
 
27
  # --- Init vars ---
28
  connector = CrowsPairsExplorerConnector(
 
118
  )
119
 
120
  # --- Logs ---
121
+ # save_field = [sent0, sent1, sent2, sent3, sent4, sent5]
122
+ # log_callback.setup(
123
+ # components=save_field,
124
+ # flagging_dir=f"logs_crows_pairs"
125
+ # )
126
 
127
+ # btn.click(
128
+ # fn=lambda *args: log_callback.flag(
129
+ # flag_data=args,
130
+ # flag_option="crows_pairs",
131
+ # username="vialibre"
132
+ # ),
133
+ # inputs=save_field,
134
+ # outputs=None,
135
+ # preprocess=False
136
+ # )
137
 
138
  return iface