Martijn van Beers commited on
Commit
a9179d9
1 Parent(s): ef158cd

Try parallel interfaces

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -231,4 +231,21 @@ hila = gradio.Interface(
231
  ],
232
  interpretation=sentiment_explanation_hila
233
  )
234
- hila.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
  ],
232
  interpretation=sentiment_explanation_hila
233
  )
234
+ shap = gradio.Interface(
235
+ fn=sentence_sentiment,
236
+ inputs="text",
237
+ outputs="label",
238
+ title="RoBERTa Explanability",
239
+ description="gradio shap explanations",
240
+ examples=[
241
+ [
242
+ "This movie was the best movie I have ever seen! some scenes were ridiculous, but acting was great"
243
+ ],
244
+ [
245
+ "I really didn't like this movie. Some of the actors were good, but overall the movie was boring"
246
+ ],
247
+ ],
248
+ interpretation="shap"
249
+
250
+ iface = gradio.Parallel(hila, shap)
251
+ iface.launch()