Spaces:
Running
Running
-- Added URL, getting API info etc in Readme.md
Browse files-- Added spaces.yaml to fix the iframe height issue when deployed in HF Spaces
-- Added a few badges in the UI
- README.md +38 -19
- app.py +6 -0
- spaces.yaml +8 -0
README.md
CHANGED
|
@@ -36,6 +36,7 @@ Scrape any web page, ask questions, and get structured answers powered by LangCh
|
|
| 36 |
| **Langfuse** | Tracing and observability for all operations |
|
| 37 |
| **Gradio** | Interactive web UI |
|
| 38 |
| **Docker** | Containerized deployment |
|
|
|
|
| 39 |
|
| 40 |
---
|
| 41 |
|
|
@@ -100,23 +101,37 @@ Access the app at http://localhost:12200.
|
|
| 100 |
|
| 101 |
To use this app, you'll need API keys for **Google Gemini**, **NVIDIA NIM**, and **FireCrawl**. For full observability, you'll also need keys for **Langfuse**.
|
| 102 |
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
2. Click **"Create API Key"** and copy the key.
|
| 106 |
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
|
|
|
| 110 |
|
| 111 |
-
|
| 112 |
-
1. Sign up at FireCrawl.dev.
|
| 113 |
-
2. Find your API key in the dashboard.
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
---
|
| 122 |
|
|
@@ -158,8 +173,12 @@ This project is open-source and distributed under the **MIT License**. Feel free
|
|
| 158 |
|
| 159 |
## π€ Acknowledgements
|
| 160 |
|
| 161 |
-
- LangChain for orchestrating LLM interactions.
|
| 162 |
-
- FireCrawl & Crawl4AI for providing powerful scraping backends.
|
| 163 |
-
- NVIDIA AI Endpoints & Google Gemini for their state-of-the-art LLMs.
|
| 164 |
-
- Langfuse for providing excellent observability tools.
|
| 165 |
-
- Gradio for making UI creation simple and elegant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
| **Langfuse** | Tracing and observability for all operations |
|
| 37 |
| **Gradio** | Interactive web UI |
|
| 38 |
| **Docker** | Containerized deployment |
|
| 39 |
+
| **Playwright**| Web scraping using Crawl4AI|
|
| 40 |
|
| 41 |
---
|
| 42 |
|
|
|
|
| 101 |
|
| 102 |
To use this app, you'll need API keys for **Google Gemini**, **NVIDIA NIM**, and **FireCrawl**. For full observability, you'll also need keys for **Langfuse**.
|
| 103 |
|
| 104 |
+
### π Gemini API Key
|
| 105 |
+
Gemini is Google's family of generative AI models. To get an API key:
|
|
|
|
| 106 |
|
| 107 |
+
1. Visit the [Google AI Studio](https://aistudio.google.com/api-keys).
|
| 108 |
+
2. Sign in with your Google account.
|
| 109 |
+
3. Click **"Create API Key"** and copy the key shown.
|
| 110 |
+
4. Use this key in your `.env` file or configuration as `GEMINI_API_KEY`.
|
| 111 |
|
| 112 |
+
> Note: Gemini API access may be limited based on region or account eligibility. Check the Gemini API [Rate Limits here](https://ai.google.dev/gemini-api/docs/rate-limits)
|
|
|
|
|
|
|
| 113 |
|
| 114 |
+
### π NVIDIA NIM API Key
|
| 115 |
+
NIM (NVIDIA Inference Microservices) provides hosted models via REST APIs. To get started:
|
| 116 |
+
|
| 117 |
+
1. Go to the [NVIDIA API Catalog](https://build.nvidia.com/?integrate_nim=true&hosted_api=true&modal=integrate-nim).
|
| 118 |
+
2. Choose a model (e.g., `nim-gemma`, `nim-mistral`, etc.) and click **"Get API Key"**.
|
| 119 |
+
3. Sign in or create an NVIDIA account if prompted.
|
| 120 |
+
4. Copy your key and use it as `NVIDIA_NIM_API_KEY` in your environment.
|
| 121 |
+
|
| 122 |
+
> Tip: You can test NIM endpoints directly in the browser before integrating.
|
| 123 |
+
|
| 124 |
+
### π FireCrawl API Key
|
| 125 |
+
|
| 126 |
+
1. Sign up at [FireCrawl](https://www.firecrawl.dev/).
|
| 127 |
+
2. Find your API key in the dashboard.
|
| 128 |
+
|
| 129 |
+
### π Langfuse API Keys (Optional)
|
| 130 |
+
|
| 131 |
+
1. Sign up or log in at [Langfuse Cloud](https://cloud.langfuse.com/).
|
| 132 |
+
2. Navigate to your project settings and then to the "API Keys" tab.
|
| 133 |
+
3. Create a new key pair to get your `LANGFUSE_PUBLIC_KEY` (starts with `pk-lf-...`) and `LANGFUSE_SECRET_KEY` (starts with `sk-lf-...`).
|
| 134 |
+
4. Add these to your `.env` file to enable tracing.
|
| 135 |
|
| 136 |
---
|
| 137 |
|
|
|
|
| 173 |
|
| 174 |
## π€ Acknowledgements
|
| 175 |
|
| 176 |
+
- [LangChain](https://www.langchain.com/) for orchestrating LLM interactions.
|
| 177 |
+
- [FireCrawl](https://www.firecrawl.dev/) & [Crawl4AI](https://docs.crawl4ai.com/) for providing powerful scraping backends.
|
| 178 |
+
- [NVIDIA AI Endpoints](https://build.nvidia.com/models) & [Google Gemini API](https://ai.google.dev/gemini-api/docs) for their state-of-the-art LLMs.
|
| 179 |
+
- [Langfuse](https://langfuse.com/) for providing excellent observability tools.
|
| 180 |
+
- [Gradio](https://www.gradio.app/) for making UI creation simple and elegant.
|
| 181 |
+
- [Docker](https://www.docker.com/) for containerization
|
| 182 |
+
- [Playwright](https://playwright.dev/) for web scraping using [Crawl4AI](https://docs.crawl4ai.com/)
|
| 183 |
+
|
| 184 |
+
---
|
app.py
CHANGED
|
@@ -136,6 +136,12 @@ with gr.Blocks() as gradio_ui:
|
|
| 136 |
<a href="https://docs.crawl4ai.com/" target="_blank">
|
| 137 |
<img src="https://img.shields.io/badge/Crawl4AI-Web%20Scraper-blueviolet?logo=github" alt="Crawl4AI">
|
| 138 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
</div>
|
| 141 |
</div>
|
|
|
|
| 136 |
<a href="https://docs.crawl4ai.com/" target="_blank">
|
| 137 |
<img src="https://img.shields.io/badge/Crawl4AI-Web%20Scraper-blueviolet?logo=github" alt="Crawl4AI">
|
| 138 |
</a>
|
| 139 |
+
<a href="https://playwright.dev/" target="_blank">
|
| 140 |
+
<img src="https://img.shields.io/badge/Playwright-Web%20Automation-brightgreen?logo=playwright" alt="Playwright">
|
| 141 |
+
</a>
|
| 142 |
+
<a href="https://langfuse.com/" target="_blank">
|
| 143 |
+
<img src="https://img.shields.io/badge/Langfuse-Observability-blue" alt="Langfuse">
|
| 144 |
+
</a>
|
| 145 |
|
| 146 |
</div>
|
| 147 |
</div>
|
spaces.yaml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
sdk: docker
|
| 2 |
+
container:
|
| 3 |
+
port: 7860
|
| 4 |
+
devPort: 7860
|
| 5 |
+
keepAlive: true
|
| 6 |
+
gpu: false
|
| 7 |
+
allowInternetAccess: true
|
| 8 |
+
height: 1000 # π This enables scrolling
|