DanielSc4 commited on
Commit
b351586
1 Parent(s): b5fc718
Files changed (2) hide show
  1. app.py +8 -1
  2. test.ipynb +10 -0
app.py CHANGED
@@ -191,16 +191,23 @@ def main(choose_context):
191
 
192
 
193
  with gr.Blocks() as demo:
 
 
194
  button = gr.Radio(
195
  label="Plot type",
196
  choices=['scatter_plot', 'heatmap', 'us_map', 'interactive_barplot', "radial", "multiline"], value='scatter_plot'
197
  )
 
198
  choose_context = gr.Radio(
199
  label="Context LDA",
200
  choices=['comment', 'sup comment', 'sup comment + comment'], value='sup comment'
201
  )
202
  plot = gr.Plot(label="Plot")
203
- button.change(main, inputs=[choose_context], outputs=[plot])
 
 
 
 
204
  demo.load(main, inputs=[choose_context], outputs=[plot])
205
 
206
 
 
191
 
192
 
193
  with gr.Blocks() as demo:
194
+ gr.Markdown("## Dashboard per l'analisi di LDA")
195
+ gr.Markdown("#### Questo 猫 un sottotitolo")
196
  button = gr.Radio(
197
  label="Plot type",
198
  choices=['scatter_plot', 'heatmap', 'us_map', 'interactive_barplot', "radial", "multiline"], value='scatter_plot'
199
  )
200
+ # gradio.Dataframe(路路路)
201
  choose_context = gr.Radio(
202
  label="Context LDA",
203
  choices=['comment', 'sup comment', 'sup comment + comment'], value='sup comment'
204
  )
205
  plot = gr.Plot(label="Plot")
206
+ choose_context.change(main, inputs=[choose_context], outputs=[plot])
207
+
208
+ btn = gr.Button(value="Submit")
209
+ btn.click(main, inputs=[choose_context], outputs=[plot])
210
+
211
  demo.load(main, inputs=[choose_context], outputs=[plot])
212
 
213
 
test.ipynb CHANGED
@@ -249,6 +249,16 @@
249
  "source": [
250
  "pd.read_csv('./data/results.csv', index_col=0)"
251
  ]
 
 
 
 
 
 
 
 
 
 
252
  }
253
  ],
254
  "metadata": {
 
249
  "source": [
250
  "pd.read_csv('./data/results.csv', index_col=0)"
251
  ]
252
+ },
253
+ {
254
+ "cell_type": "markdown",
255
+ "metadata": {},
256
+ "source": [
257
+ "TODO:\n",
258
+ "- Show LDA top words for each topic\n",
259
+ "- I topic con una bassa percentuale di ironia sono i topic considerati pi霉 \"seri\" (?)\n",
260
+ "- Per ora sto utilizzando le label assegnate dal dataset, se non avessi le label e dovessi prevedere l'ironia LDA 猫 cmq affidabile?"
261
+ ]
262
  }
263
  ],
264
  "metadata": {