gamingflexer commited on
Commit
9d3094d
·
1 Parent(s): 5b61070

Add application file

Browse files
Files changed (1) hide show
  1. app.py +36 -0
app.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Dummy function to simulate the podcast creation
4
+ def create_podcast(data):
5
+ # Simulate a successful response
6
+ if data["user_id"] == 1:
7
+ return {
8
+ "data": {
9
+ "id": 2,
10
+ },
11
+ "success": True,
12
+ "message": "Podcast created successfully"
13
+ }
14
+ # Simulate a failure response
15
+ else:
16
+ return {
17
+ "data": {},
18
+ "success": False,
19
+ "message": "Podcast creation failed"
20
+ }
21
+
22
+ # Define the input and output interfaces for Gradio
23
+ input_interface = gr.Interface(
24
+ fn=create_podcast,
25
+ inputs="text",
26
+ outputs="text",
27
+ title="Podcast Creation",
28
+ description="Create a podcast",
29
+ examples=[
30
+ ["{ \"links\": [\"https://dribbble.com/shots/15045344-Podcast-Platform-UI-Concept-1/attachments/6771120?mode=media\", \"https://dribbble.com/shots/15045344-Podcast-Platform-UI-Concept-1/attachments/6771120?mode=media\", \"https://dribbble.com/shots/15045344-Podcast-Platform-UI-Concept-1/attachments/6771120?mode=media\"], \"user_id\": 1 }"]
31
+ ]
32
+ )
33
+
34
+ # Run the Gradio app
35
+ input_interface.launch()
36
+