GiladtheFixer commited on
Commit
33fa952
·
verified ·
1 Parent(s): 7d6e29c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -2
app.py CHANGED
@@ -1,4 +1,21 @@
1
- from tensorflow.keras.models import load_model
2
 
3
- model = load_model("https://huggingface.co/your-username/your-model-name/resolve/main/my_model.h5")
 
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
+ import gradio as gr
3
+ import tensorflow as tf
4
 
5
+ # Load your model
6
+ model = tf.keras.models.load_model("https://huggingface.co/your-username/your-model-name/resolve/main/my_model.h5")
7
+
8
+ # Define your input and output components
9
+ input_component = gr.Textbox()
10
+ output_component = gr.Textbox()
11
+
12
+ # Define your Gradio interface
13
+ interface = gr.Interface(
14
+ fn=model,
15
+ inputs=input_component,
16
+ outputs=output_component,
17
+ live=True,
18
+ )
19
+
20
+ # Launch the interface
21
+ interface.launch()