aitcharif commited on
Commit
b8c7dff
·
verified ·
1 Parent(s): 7d42161

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def generate_text(prompt):
4
+ interface = gr.load("models/mistralai/Mistral-7B-Instruct-v0.3")
5
+ response = interface(prompt)
6
+ return response
7
+
8
+ iface = gr.Interface(
9
+ fn=generate_text,
10
+ inputs="text",
11
+ outputs="text",
12
+ title="Mistral Text Generation",
13
+ description="Générer du texte en utilisant le modèle Mistral-7B-Instruct-v0.3"
14
+ )
15
+
16
+ iface.launch()