Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- app.py +24 -0
- lambda.png +0 -0
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
# -*- coding: utf-8 -*-
|
|
|
|
| 2 |
"""
|
| 3 |
OpenResearcher DeepSearch Agent - Hugging Face Space
|
| 4 |
Uses ZeroGPU for efficient inference with the Nemotron model
|
|
@@ -2351,6 +2352,8 @@ def create_interface():
|
|
| 2351 |
|
| 2352 |
logo_base64 = image_to_base64(logo_path)
|
| 2353 |
title_base64 = image_to_base64(title_path)
|
|
|
|
|
|
|
| 2354 |
|
| 2355 |
# Build header HTML with base64 images
|
| 2356 |
header_html = f"""
|
|
@@ -2512,6 +2515,27 @@ def create_interface():
|
|
| 2512 |
stop_btn = gr.Button("⏹ Stop", variant="stop", scale=1)
|
| 2513 |
clear_btn = gr.Button("🗑 Clear", scale=1)
|
| 2514 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2515 |
# Function to hide welcome and show output
|
| 2516 |
async def start_research(question, serper_key, max_rounds):
|
| 2517 |
# Generator that first hides welcome, then streams results
|
|
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
+
from __future__ import annotations
|
| 3 |
"""
|
| 4 |
OpenResearcher DeepSearch Agent - Hugging Face Space
|
| 5 |
Uses ZeroGPU for efficient inference with the Nemotron model
|
|
|
|
| 2352 |
|
| 2353 |
logo_base64 = image_to_base64(logo_path)
|
| 2354 |
title_base64 = image_to_base64(title_path)
|
| 2355 |
+
lambda_path = os.path.join(script_dir, "lambda.png")
|
| 2356 |
+
lambda_base64 = image_to_base64(lambda_path)
|
| 2357 |
|
| 2358 |
# Build header HTML with base64 images
|
| 2359 |
header_html = f"""
|
|
|
|
| 2515 |
stop_btn = gr.Button("⏹ Stop", variant="stop", scale=1)
|
| 2516 |
clear_btn = gr.Button("🗑 Clear", scale=1)
|
| 2517 |
|
| 2518 |
+
# Lambda sponsor banner
|
| 2519 |
+
_lambda_img_tag = f'<img src="{lambda_base64}" alt="Lambda" style="height:22px; vertical-align:middle; margin-right:4px;">' if lambda_base64 else '<span style="font-weight:bold;">λ</span>'
|
| 2520 |
+
gr.HTML(f"""
|
| 2521 |
+
<div style="
|
| 2522 |
+
display: flex;
|
| 2523 |
+
align-items: center;
|
| 2524 |
+
justify-content: center;
|
| 2525 |
+
gap: 6px;
|
| 2526 |
+
margin-top: 8px;
|
| 2527 |
+
font-size: 13px;
|
| 2528 |
+
color: #6b7280;
|
| 2529 |
+
">
|
| 2530 |
+
<span>LLM Service Deployed on</span>
|
| 2531 |
+
<a href="https://lambda.ai/" target="_blank" rel="noopener noreferrer"
|
| 2532 |
+
style="display:inline-flex; align-items:center; gap:4px; color:inherit; text-decoration:none;">
|
| 2533 |
+
<span style="font-weight:600; color:#111827;">Lambda .Inc</span>
|
| 2534 |
+
{_lambda_img_tag}
|
| 2535 |
+
</a>
|
| 2536 |
+
</div>
|
| 2537 |
+
""")
|
| 2538 |
+
|
| 2539 |
# Function to hide welcome and show output
|
| 2540 |
async def start_research(question, serper_key, max_rounds):
|
| 2541 |
# Generator that first hides welcome, then streams results
|
lambda.png
ADDED
|