Spaces:
Sleeping
Sleeping
Commit
·
1243ea7
1
Parent(s):
e938e19
Upload app.py
Browse files
app.py
CHANGED
@@ -35,13 +35,28 @@ def factgenerator(text, num_facts, openaikey):
|
|
35 |
with gr.Blocks() as demo:
|
36 |
gr.Markdown(
|
37 |
"""
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
with gr.Row():
|
43 |
with gr.Column():
|
44 |
-
text = gr.Textbox(lines = 5, placeholder = "PM Modi to visit Tripura tomorrow; govt expects 72,000 to attend his public meeting", label = "
|
45 |
num_facts = gr.Dropdown([1, 2, 3, 4, 5],label="Click here to select Number of facts for each entity", value = 1)
|
46 |
openaikey = gr.Textbox(lines = 1, label = "Enter Openai Key")
|
47 |
text_button = gr.Button("Submit")
|
|
|
35 |
with gr.Blocks() as demo:
|
36 |
gr.Markdown(
|
37 |
"""
|
38 |
+
<h1><center><b>FactGen</center></h1>
|
39 |
+
|
40 |
+
""")
|
41 |
+
gr.Markdown(
|
42 |
+
"""
|
43 |
+
To get a better understanding of the text, this app gives facts about the entities present in the text. It uses OpenAI GPT3 in the backend, get your
|
44 |
+
<a href = "https://beta.openai.com/account/api-keys">Openai key here</a> \n
|
45 |
""")
|
46 |
+
|
47 |
+
gr.Markdown(
|
48 |
+
"""
|
49 |
+
**To use this space effectively**
|
50 |
+
<br>- Enter your text in the input box or select one of the examples at the bottom.
|
51 |
+
<br>- Use dropdown to select the number of facts per entity.
|
52 |
+
<br>- Enter your openai key </br>
|
53 |
+
|
54 |
+
Please refer to the GitHub repo this Space is based on, here - <a href = "https://github.com/ravi03071991/FactGen">FactGen</a> .
|
55 |
+
"""
|
56 |
+
)
|
57 |
with gr.Row():
|
58 |
with gr.Column():
|
59 |
+
text = gr.Textbox(lines = 5, placeholder = "PM Modi to visit Tripura tomorrow; govt expects 72,000 to attend his public meeting", label = "Input")
|
60 |
num_facts = gr.Dropdown([1, 2, 3, 4, 5],label="Click here to select Number of facts for each entity", value = 1)
|
61 |
openaikey = gr.Textbox(lines = 1, label = "Enter Openai Key")
|
62 |
text_button = gr.Button("Submit")
|