history008 commited on
Commit
6a4ebca
·
verified ·
1 Parent(s): 08604ef

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from skyvern import Skyvern # Ensure Skyvern import works
3
+
4
+ # Initialize Skyvern AI
5
+ sky = Skyvern()
6
+
7
+ def process_task(user_input):
8
+ try:
9
+ result = sky.run_task(user_input)
10
+ except Exception as e:
11
+ result = f"Error: {e}"
12
+ return result
13
+
14
+ # Gradio interface
15
+ iface = gr.Interface(
16
+ fn=process_task,
17
+ inputs=gr.Textbox(label="Enter your task"),
18
+ outputs=gr.Textbox(label="Skyvern Output"),
19
+ title="Skyvern AI App"
20
+ )
21
+
22
+ if __name__ == "__main__":
23
+ iface.launch()