Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -191,8 +191,8 @@ def predire(image):
|
|
| 191 |
textposition='auto'
|
| 192 |
))
|
| 193 |
fig.update_layout(
|
| 194 |
-
xaxis=dict(tickangle=45, tickfont=dict(size=15)),
|
| 195 |
-
yaxis=dict(range=[0,1], title="Probabilité", tickfont=dict(size=14)),
|
| 196 |
title="\n\nProbabilités par mouvement pictural",
|
| 197 |
margin=dict(l=20, r=20, t=32, b=46),
|
| 198 |
height=500,
|
|
@@ -201,6 +201,8 @@ def predire(image):
|
|
| 201 |
return fig
|
| 202 |
|
| 203 |
# Interface Gradio
|
|
|
|
|
|
|
| 204 |
demo = gr.Interface(
|
| 205 |
fn=predire,
|
| 206 |
inputs=gr.Image(type="numpy", label="Importer une œuvre"),
|
|
|
|
| 191 |
textposition='auto'
|
| 192 |
))
|
| 193 |
fig.update_layout(
|
| 194 |
+
xaxis=dict(fixedrange=True, tickangle=45, tickfont=dict(size=15)),
|
| 195 |
+
yaxis=dict(fixedrange=True, range=[0,1], title="Probabilité", tickfont=dict(size=14)),
|
| 196 |
title="\n\nProbabilités par mouvement pictural",
|
| 197 |
margin=dict(l=20, r=20, t=32, b=46),
|
| 198 |
height=500,
|
|
|
|
| 201 |
return fig
|
| 202 |
|
| 203 |
# Interface Gradio
|
| 204 |
+
# Exemple pour Plotly hors Gradio :
|
| 205 |
+
fig.show(config={'displayModeBar': False})
|
| 206 |
demo = gr.Interface(
|
| 207 |
fn=predire,
|
| 208 |
inputs=gr.Image(type="numpy", label="Importer une œuvre"),
|