Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask, request, render_template, jsonify
|
2 |
+
import os
|
3 |
+
from tempfile import NamedTemporaryFile
|
4 |
+
from gradio_client import Client, handle_file # Importez gradio_client
|
5 |
+
|
6 |
+
app = Flask(__name__)
|
7 |
+
|
8 |
+
# Configuration de Gemini
|
9 |
+
|
10 |
+
GOOGLE_API_KEY = os.environ.get("TOKEN")
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
@app.route('/')
|
15 |
+
def index():
|
16 |
+
return render_template('traduction.html')
|
17 |
+
|
18 |
+
|
19 |
+
|