Spaces:
Running
Running
Update index.html
Browse files- index.html +20 -8
index.html
CHANGED
|
@@ -2,21 +2,33 @@
|
|
| 2 |
<head>
|
| 3 |
<meta charset="utf-8" />
|
| 4 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 5 |
-
<title>
|
| 6 |
-
<!-- 1. Importer le JavaScript et le CSS de Gradio-Lite -->
|
| 7 |
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.js"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.css" />
|
| 9 |
</head>
|
| 10 |
<body>
|
| 11 |
-
<!-- 2. Le conteneur de l'application -->
|
| 12 |
<gradio-lite>
|
| 13 |
-
<!--
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
</gradio-lite>
|
| 21 |
</body>
|
| 22 |
</html>
|
|
|
|
| 2 |
<head>
|
| 3 |
<meta charset="utf-8" />
|
| 4 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 5 |
+
<title>Gradio-Lite multi-fichiers</title>
|
|
|
|
| 6 |
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.js"></script>
|
| 7 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.css" />
|
| 8 |
</head>
|
| 9 |
<body>
|
|
|
|
| 10 |
<gradio-lite>
|
| 11 |
+
<!-- Fichier principal -->
|
| 12 |
+
<gradio-file name="app.py" entrypoint>
|
| 13 |
+
import gradio as gr
|
| 14 |
+
from mon_module import traiter
|
| 15 |
|
| 16 |
+
def process(texte):
|
| 17 |
+
return traiter(texte)
|
| 18 |
|
| 19 |
+
gr.Interface(process, "textbox", "textbox").launch()
|
| 20 |
+
</gradio-file>
|
| 21 |
+
|
| 22 |
+
<!-- Module supplémentaire -->
|
| 23 |
+
<gradio-file name="mon_module.py">
|
| 24 |
+
def traiter(texte):
|
| 25 |
+
return texte.upper()
|
| 26 |
+
</gradio-file>
|
| 27 |
+
|
| 28 |
+
<!-- Dépendances -->
|
| 29 |
+
<gradio-requirements>
|
| 30 |
+
# Pas de dépendances particulières ici
|
| 31 |
+
</gradio-requirements>
|
| 32 |
</gradio-lite>
|
| 33 |
</body>
|
| 34 |
</html>
|