Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import torch
|
3 |
+
|
4 |
+
# Load your model (replace with your model loading code)
|
5 |
+
model = torch.load('your_model.pth')
|
6 |
+
|
7 |
+
def predict(input_data):
|
8 |
+
# Process input and make prediction
|
9 |
+
return model(input_data)
|
10 |
+
|
11 |
+
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
12 |
+
iface.launch()
|