WHG2023
commited on
Commit
Β·
52d7f2a
1
Parent(s):
9319d04
fix: Correct Hugging Face Spaces metadata
Browse files
README.md
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Patent Architect AI v2
|
3 |
+
emoji: ποΈ
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: yellow
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: "4.44.0"
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
+
|
12 |
+
# ποΈ Patent Architect AI v2 - True Agentic Workflow
|
13 |
+
|
14 |
+
**An AI-powered system that uses a team of collaborating agents to transform a raw idea into a strategized patent draft.**
|
15 |
+
|
16 |
+
This application demonstrates a true multi-agent system where different AI agents, each with a specific role, negotiate and collaborate to produce a comprehensive patent application. It includes live prior art searches and multiple forms of AI-generated visual aids.
|
17 |
+
|
18 |
+
## π― Key Features
|
19 |
+
|
20 |
+
### **π€ True Agentic Collaboration**
|
21 |
+
A team of specialized AI agents work together, with the output of one agent influencing the actions of the next.
|
22 |
+
- **Prior Art Detective**: Performs *live* web searches on Google Patents and Wikipedia to find relevant prior art.
|
23 |
+
- **Chief Strategist**: Analyzes the prior art and formulates a defensible patenting strategy.
|
24 |
+
- **Technical Writer, Claims Drafter, Figure Drafter**: Generate the core sections of the patent, all adhering to the Chief Strategist's mandate.
|
25 |
+
- **Conceptual Artist**: Generates a high-quality conceptual image of the invention using the Segmind Ideogram API.
|
26 |
+
|
27 |
+
### **π¨ Dual Visual Outputs**
|
28 |
+
The system generates two distinct, real images to aid understanding:
|
29 |
+
- **Conceptual Image**: A photorealistic image from the Segmind API that helps visualize the invention's marketing potential.
|
30 |
+
- **Technical Figure**: A patent-style drawing rendered from real LaTeX/TikZ code, which is essential for the patent document itself.
|
31 |
+
|
32 |
+
### **π‘ From First Principles**
|
33 |
+
This application is built with a focus on robust, elegant design. It handles errors gracefully and makes agent interactions transparent, demonstrating a resilient and well-architected system.
|
34 |
+
|
35 |
+
---
|
36 |
+
|
37 |
+
## π Getting Started
|
38 |
+
|
39 |
+
### 1. Install Dependencies
|
40 |
+
Ensure you have Python 3.8+ installed, then run:
|
41 |
+
```bash
|
42 |
+
pip install -r requirements.txt
|
43 |
+
```
|
44 |
+
|
45 |
+
### 2. Set Up API Keys (Crucial Step)
|
46 |
+
This application requires API keys to function. Your keys are not stored or shared.
|
47 |
+
|
48 |
+
#### **For Local Development:**
|
49 |
+
1. **Create a `.env` file** in the main project directory.
|
50 |
+
2. **Copy the text below** into your `.env` file.
|
51 |
+
3. **Add your secret keys** in place of the placeholder text.
|
52 |
+
|
53 |
+
```
|
54 |
+
# .env file for Patent Architect AI v2
|
55 |
+
|
56 |
+
# Required for the core language model agents (Strategist, Writer, etc.)
|
57 |
+
# Get a key from Google AI Studio: https://makersuite.google.com/app/apikey
|
58 |
+
GEMINI_API_KEY="YOUR_GEMINI_API_KEY_HERE"
|
59 |
+
|
60 |
+
# Required for the PriorArtDetective agent to perform live web searches.
|
61 |
+
# Get a free key from SerpApi: https://serpapi.com/
|
62 |
+
SERPAPI_API_KEY="YOUR_SERPAPI_API_KEY_HERE"
|
63 |
+
|
64 |
+
# Required for the ConceptualArtist agent to generate high-quality images.
|
65 |
+
# Get a free key from Segmind: https://segmind.com/
|
66 |
+
SEGMIND_API_KEY="YOUR_SEGMIND_API_KEY_HERE"
|
67 |
+
```
|
68 |
+
|
69 |
+
#### **For Hugging Face Spaces Deployment:**
|
70 |
+
1. Do **not** upload your `.env` file.
|
71 |
+
2. In your Space settings, go to the **"Secrets"** section.
|
72 |
+
3. Add each of the three keys (`GEMINI_API_KEY`, `SERPAPI_API_KEY`, `SEGMIND_API_KEY`) as a separate secret.
|
73 |
+
|
74 |
+
### 3. Run the Application
|
75 |
+
Once your API keys are configured, run the app:
|
76 |
+
```
|