johaunh commited on
Commit
6046756
·
1 Parent(s): 7e0f94e

Add markdown formatting

Browse files
Files changed (1) hide show
  1. main.py +6 -5
main.py CHANGED
@@ -147,17 +147,18 @@ def create_knowledge_graph(api_key: str, ngram_size: int, axiomatize: bool, text
147
  class App:
148
  def __init__(self):
149
  description = (
150
- "Text2KG is a framework that creates knowledge graphs from unstructured text.\n"
151
- "The framework uses ChatGPT to fulfill this task.\n"
152
- "First, configure the pipeline, then add the text that will be processed."
 
153
  )
154
  demo = gr.Interface(
155
  fn=create_knowledge_graph,
156
  description=description,
157
  inputs=[
158
  gr.Textbox(placeholder="API key...", label="OpenAI API Key", type="password"),
159
- gr.Slider(minimum=1, maximum=10, step=1, label="Sentence Batching", info="Number of sentences per forward pass? Affects the number of calls made to ChatGPT.", ),
160
- gr.Checkbox(label="Axiom Decomposition", info="Decompose sentences into simpler axioms?\n(ex: \"I like cats and dogs.\" = \"I like cats. I like dogs.\")\nDoubles the number of calls to ChatGPT."),
161
  gr.Textbox(lines=2, placeholder="Text Here...", label="Input Text"),
162
  ],
163
  outputs=[
 
147
  class App:
148
  def __init__(self):
149
  description = (
150
+ "# Text2KG\n\n"
151
+ "Text2KG is a framework that automatically creates knowledge graphs from unstructured text.\n\n"
152
+ "This framework uses ChatGPT to fulfill that task.\n\n"
153
+ "**Usage:** (1) configure the pipeline; (2) add the text that will be processed"
154
  )
155
  demo = gr.Interface(
156
  fn=create_knowledge_graph,
157
  description=description,
158
  inputs=[
159
  gr.Textbox(placeholder="API key...", label="OpenAI API Key", type="password"),
160
+ gr.Slider(minimum=1, maximum=10, step=1, label="Sentence Batch Size", info="Number of sentences per forward pass? Affects the number of calls made to ChatGPT.", ),
161
+ gr.Checkbox(label="Axiom Decomposition", info="Decompose sentences into simpler axioms? (ex: \"I like cats and dogs.\" = \"I like cats. I like dogs.\")\n\nDoubles the number of calls to ChatGPT."),
162
  gr.Textbox(lines=2, placeholder="Text Here...", label="Input Text"),
163
  ],
164
  outputs=[