Spaces:
Sleeping
Sleeping
Update app.py
Browse filesAdding wandb KEY
app.py
CHANGED
@@ -6,6 +6,15 @@ import gradio as gr
|
|
6 |
from huggingface_hub import InferenceClient
|
7 |
import wandb
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# 1. Initialize W&B (free tier) for basic logging
|
10 |
wandb.init(project="misra-smart-fixer", entity="YOUR_WANDB_USER")
|
11 |
|
|
|
6 |
from huggingface_hub import InferenceClient
|
7 |
import wandb
|
8 |
|
9 |
+
# non-interactive login
|
10 |
+
api_key = os.getenv("WANDB_API_KEY")
|
11 |
+
if api_key:
|
12 |
+
wandb.login(key=api_key, relogin=True)
|
13 |
+
wandb.init(project="misra-smart-fixer", entity="dipesh-gen-ai-2025")
|
14 |
+
else:
|
15 |
+
# disable wandb entirely if key missing
|
16 |
+
wandb.init(mode="disabled")
|
17 |
+
|
18 |
# 1. Initialize W&B (free tier) for basic logging
|
19 |
wandb.init(project="misra-smart-fixer", entity="YOUR_WANDB_USER")
|
20 |
|