Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,7 +80,7 @@ MAX_CATEGORIES = 8
|
|
| 80 |
with gr.Blocks(title="Historical Text Analyser", css=".prose { word-break: break-word; }") as demo:
|
| 81 |
gr.Markdown("# Historical Text Analyser")
|
| 82 |
gr.Markdown("""
|
| 83 |
-
First, a **Conceptual AI**, powered by a generative AI Large Language Model (LLM) such as OpenAI's GPT-4, Anthropic's Claude, or Google's Gemini, suggests labels based on your chosen historical topic. These labels are grouped into broader categories (e.g. Economic Policies, Significant Events) to help focus your research.
|
| 84 |
Second, an **Extraction AI**, powered by the GLiNER model, scans your source text to find and highlight matching entities - instances where those labels appear in the document - with high accuracy.
|
| 85 |
### Understanding Entities and Labels ###
|
| 86 |
In text analysis, this process is often called Named Entity Recognition (NER).
|
|
@@ -91,7 +91,7 @@ with gr.Blocks(title="Historical Text Analyser", css=".prose { word-break: break
|
|
| 91 |
|
| 92 |
gr.Markdown("--- \n## Step 1: Generate Labels")
|
| 93 |
with gr.Row():
|
| 94 |
-
topic = gr.Textbox(label="Enter a Historical Topic",
|
| 95 |
provider = gr.Dropdown(choices=list(MODEL_OPTIONS.keys()), label="Choose AI Model")
|
| 96 |
with gr.Row():
|
| 97 |
openai_key = gr.Textbox(label="OpenAI API Key", type="password")
|
|
|
|
| 80 |
with gr.Blocks(title="Historical Text Analyser", css=".prose { word-break: break-word; }") as demo:
|
| 81 |
gr.Markdown("# Historical Text Analyser")
|
| 82 |
gr.Markdown("""
|
| 83 |
+
First, a **Conceptual AI**, powered by a generative AI Large Language Model (LLM) such as OpenAI's GPT-4, Anthropic's Claude, or Google's Gemini, suggests labels based on your chosen historical topic. These labels are grouped into broader categories (e.g. Economic Policies, Significant Events) to help focus your research.
|
| 84 |
Second, an **Extraction AI**, powered by the GLiNER model, scans your source text to find and highlight matching entities - instances where those labels appear in the document - with high accuracy.
|
| 85 |
### Understanding Entities and Labels ###
|
| 86 |
In text analysis, this process is often called Named Entity Recognition (NER).
|
|
|
|
| 91 |
|
| 92 |
gr.Markdown("--- \n## Step 1: Generate Labels")
|
| 93 |
with gr.Row():
|
| 94 |
+
topic = gr.Textbox(label="Enter a Historical Topic", placeholder="e.g. Britain during the Second World War")
|
| 95 |
provider = gr.Dropdown(choices=list(MODEL_OPTIONS.keys()), label="Choose AI Model")
|
| 96 |
with gr.Row():
|
| 97 |
openai_key = gr.Textbox(label="OpenAI API Key", type="password")
|