raannakasturi commited on
Commit
927b324
·
verified ·
1 Parent(s): dc0bcf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +47 -40
app.py CHANGED
@@ -1,41 +1,48 @@
1
- import gradio as gr
2
- from main import post_blogpost
3
-
4
- def clear_everything(title, category, summary, mindmap, citation, status, access_key):
5
- return None, None, None, None, None, None, None
6
-
7
- theme = gr.themes.Soft(
8
- primary_hue="purple",
9
- secondary_hue="cyan",
10
- neutral_hue="slate",
11
- font=[
12
- gr.themes.GoogleFont("Syne"),
13
- gr.themes.GoogleFont("Poppins"),
14
- gr.themes.GoogleFont("Poppins"),
15
- gr.themes.GoogleFont("Poppins")
16
- ],
17
- )
18
-
19
- with gr.Blocks(theme=theme, title="ReXplore Backend", fill_height=True) as app:
20
- gr.HTML(
21
- value ="""
22
- <h1 style="text-align: center;">ReXplore Backend<p style="text-align: center;">Designed and Developed by <a href="https://raannakasturi.eu.org" target="_blank" rel="nofollow noreferrer external">Nayan Kasturi</a></p> </h1>
23
- <p style="text-align: center;">Backend for ReXplore</p>
24
- """)
25
- with gr.Row():
26
- with gr.Column():
27
- access_key = gr.Textbox(label="Access Key", placeholder="Enter the Access Key", type="password")
28
- start = gr.Button(value="Start", variant="primary")
29
- status = gr.Textbox(label="Data", placeholder="Enter the data", lines=7)
30
- start.click(
31
- post_blogpost,
32
- inputs=[access_key],
33
- outputs=[status],
34
- concurrency_limit=25,
35
- scroll_to_output=True,
36
- show_api=True,
37
- api_name="rexplore_backend",
38
- show_progress="full",
39
- )
40
-
 
 
 
 
 
 
 
41
  app.queue(default_concurrency_limit=25).launch(show_api=True, show_error=True, debug=True)
 
1
+ import gradio as gr
2
+ from main import post_blogpost
3
+ from post_blog import test
4
+
5
+ def clear_everything(title, category, summary, mindmap, citation, status, access_key):
6
+ return None, None, None, None, None, None, None
7
+
8
+ theme = gr.themes.Soft(
9
+ primary_hue="purple",
10
+ secondary_hue="cyan",
11
+ neutral_hue="slate",
12
+ font=[
13
+ gr.themes.GoogleFont("Syne"),
14
+ gr.themes.GoogleFont("Poppins"),
15
+ gr.themes.GoogleFont("Poppins"),
16
+ gr.themes.GoogleFont("Poppins")
17
+ ],
18
+ )
19
+
20
+ with gr.Blocks(theme=theme, title="ReXplore Backend", fill_height=True) as app:
21
+ gr.HTML(
22
+ value ="""
23
+ <h1 style="text-align: center;">ReXplore Backend<p style="text-align: center;">Designed and Developed by <a href="https://raannakasturi.eu.org" target="_blank" rel="nofollow noreferrer external">Nayan Kasturi</a></p> </h1>
24
+ <p style="text-align: center;">Backend for ReXplore</p>
25
+ """)
26
+ with gr.Row():
27
+ with gr.Column():
28
+ access_key = gr.Textbox(label="Access Key", placeholder="Enter the Access Key", type="password")
29
+ start = gr.Button(value="Start", variant="primary")
30
+ test_btn = gr.Button(value="Test")
31
+ status = gr.Textbox(label="Data", placeholder="Enter the data", lines=7)
32
+ start.click(
33
+ post_blogpost,
34
+ inputs=[access_key],
35
+ outputs=[status],
36
+ concurrency_limit=25,
37
+ scroll_to_output=True,
38
+ show_api=True,
39
+ api_name="rexplore_backend",
40
+ show_progress="full",
41
+ )
42
+ test_btn.click(test, outputs=[status], concurrency_limit=25,
43
+ scroll_to_output=True,
44
+ show_api=True,
45
+ api_name="rexplore_backend_test",
46
+ show_progress="full",)
47
+
48
  app.queue(default_concurrency_limit=25).launch(show_api=True, show_error=True, debug=True)