[email protected] commited on
Commit
96cde7c
·
1 Parent(s): 75466a3

Can store user correction

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -138,8 +138,9 @@ def infere(
138
  model_output = ""
139
  for new_text in streamer:
140
  model_output += new_text
141
- yield model_output
142
- return model_output
 
143
 
144
 
145
  # Create a Gradio interface with the infere function and specified title and descriptions
@@ -181,11 +182,22 @@ autoeval = gr.Interface(
181
  gr.Textbox(
182
  label="Sortie",
183
  info="Cette IA n'est pas finalisée, considérez ceci comme une idée pour rédiger votre appréciation.",
184
- )
 
 
 
 
 
 
 
 
185
  ],
186
  title=title,
187
  description=desc,
188
  article=long_desc,
 
 
 
189
  )
190
 
191
  # Launch the Gradio interface and share it
 
138
  model_output = ""
139
  for new_text in streamer:
140
  model_output += new_text
141
+ yield model_output,""
142
+
143
+ return model_output, ""
144
 
145
 
146
  # Create a Gradio interface with the infere function and specified title and descriptions
 
182
  gr.Textbox(
183
  label="Sortie",
184
  info="Cette IA n'est pas finalisée, considérez ceci comme une idée pour rédiger votre appréciation.",
185
+ interactive=False,
186
+ show_copy_button=True
187
+ ),
188
+ gr.Textbox(
189
+ label="Votre appréciation",
190
+ info="Saisissez ici l'appréciation que vous avez mis à cet élève. Cliquer ensuite sur le bouton pour enregistrer votre proposition afin d'améliorer le modèle.",
191
+ interactive=True,
192
+ show_copy_button=True
193
+ ),
194
  ],
195
  title=title,
196
  description=desc,
197
  article=long_desc,
198
+ submit_btn="🚀",
199
+ clear_btn="Effacer",
200
+ flagging_options=[("Ajouter votre appréciation", "user")]
201
  )
202
 
203
  # Launch the Gradio interface and share it