captain-awesome commited on
Commit
df11e0e
·
verified ·
1 Parent(s): 0285cf6

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ # from textblob import TextBlob
3
+ import requests
4
+
5
+ def get_list_quran_chapters(text: str) -> dict:
6
+
7
+ list_of_chapters = requests.get("https://quranapi.pages.dev/api/surah.json")
8
+
9
+
10
+
11
+ # Create the Gradio interface
12
+ demo = gr.Interface(
13
+ fn = get_list_quran_chapters,
14
+ inputs=gr.Button(placeholder="Click..."),
15
+ outputs=gr.JSON(),
16
+ title="List of chapters from Quran",
17
+ description="Get List of chapters from Quran"
18
+ )
19
+
20
+ # Launch the interface and MCP server
21
+ if __name__ == "__main__":
22
+ demo.launch(mcp_server=True)