Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- components/ChatPage.tsx +1 -1
- verify_debug.py +31 -0
- verify_live.py +55 -0
- verify_live_v2.py +52 -0
components/ChatPage.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
|
| 2 |
import React, { useState, useRef, useEffect } from 'react';
|
| 3 |
-
import { X, ClipboardList, Linkedin, Instagram, Mail, Layout, Edit3, MonitorPlay, Lightbulb, Image, Plus, Sparkles, Zap, AlertCircle, Video, Megaphone, Link as LinkIcon, Loader2, RefreshCw, CheckCircle2 } from 'lucide-react';
|
| 4 |
import { GradioService } from '../services/gradioService';
|
| 5 |
|
| 6 |
// --- Types ---
|
|
|
|
| 1 |
|
| 2 |
import React, { useState, useRef, useEffect } from 'react';
|
| 3 |
+
import { X, ClipboardList, Linkedin, Instagram, Mail, Layout, Edit3, MonitorPlay, Lightbulb, Image, Plus, Sparkles, Zap, AlertCircle, Video, Megaphone, Link as LinkIcon, Loader2, RefreshCw, CheckCircle2, MessageSquare } from 'lucide-react';
|
| 4 |
import { GradioService } from '../services/gradioService';
|
| 5 |
|
| 6 |
// --- Types ---
|
verify_debug.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from playwright.sync_api import sync_playwright
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
def run():
|
| 5 |
+
with sync_playwright() as p:
|
| 6 |
+
browser = p.chromium.launch(headless=True)
|
| 7 |
+
page = browser.new_page()
|
| 8 |
+
|
| 9 |
+
# Log console messages
|
| 10 |
+
page.on("console", lambda msg: print(f"CONSOLE: {msg.text}"))
|
| 11 |
+
page.on("pageerror", lambda err: print(f"PAGE ERROR: {err}"))
|
| 12 |
+
|
| 13 |
+
url = "https://auxteam-usersyncinterface.hf.space"
|
| 14 |
+
print(f"Navigating to {url}...")
|
| 15 |
+
try:
|
| 16 |
+
page.goto(url, timeout=90000)
|
| 17 |
+
page.wait_for_selector('text=Branding Content Testing', timeout=60000)
|
| 18 |
+
|
| 19 |
+
print("Clicking Open Global Chat...")
|
| 20 |
+
page.click('text=Open Global Chat')
|
| 21 |
+
|
| 22 |
+
page.wait_for_timeout(5000)
|
| 23 |
+
page.screenshot(path="/home/jules/verification/hf_chat_debug.png")
|
| 24 |
+
|
| 25 |
+
except Exception as e:
|
| 26 |
+
print(f"Error: {e}")
|
| 27 |
+
|
| 28 |
+
browser.close()
|
| 29 |
+
|
| 30 |
+
if __name__ == "__main__":
|
| 31 |
+
run()
|
verify_live.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from playwright.sync_api import sync_playwright
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
def run():
|
| 5 |
+
with sync_playwright() as p:
|
| 6 |
+
browser = p.chromium.launch(headless=True)
|
| 7 |
+
page = browser.new_page()
|
| 8 |
+
|
| 9 |
+
url = "https://auxteam-usersyncinterface.hf.space"
|
| 10 |
+
print(f"Navigating to {url}...")
|
| 11 |
+
page.goto(url)
|
| 12 |
+
|
| 13 |
+
# Wait for app to load
|
| 14 |
+
page.wait_for_selector('text=Branding Content Testing', timeout=60000)
|
| 15 |
+
print("Page loaded successfully.")
|
| 16 |
+
|
| 17 |
+
# Check for info box
|
| 18 |
+
page.wait_for_selector('text=Configuration Required', timeout=10000)
|
| 19 |
+
print("Info box found.")
|
| 20 |
+
|
| 21 |
+
# Check for Job Title default
|
| 22 |
+
view_mode = page.locator('select').nth(1).input_value()
|
| 23 |
+
print(f"Default view mode: {view_mode}")
|
| 24 |
+
|
| 25 |
+
# Check for Right Output Panel
|
| 26 |
+
page.wait_for_selector('text=Output', timeout=10000)
|
| 27 |
+
print("Output panel found.")
|
| 28 |
+
|
| 29 |
+
# Open Chat
|
| 30 |
+
page.click('text=Open Global Chat')
|
| 31 |
+
page.wait_for_selector('text=New Simulation', timeout=10000)
|
| 32 |
+
print("Chat page opened.")
|
| 33 |
+
|
| 34 |
+
# Check for Send and Simulate buttons
|
| 35 |
+
page.wait_for_selector('text=Send', timeout=10000)
|
| 36 |
+
page.wait_for_selector('text=Simulate', timeout=10000)
|
| 37 |
+
print("Send and Simulate buttons found.")
|
| 38 |
+
|
| 39 |
+
# Check for Help Me Craft
|
| 40 |
+
page.wait_for_selector('text=Help Me Craft', timeout=10000)
|
| 41 |
+
print("Help Me Craft button found.")
|
| 42 |
+
|
| 43 |
+
# Check for Upload Images
|
| 44 |
+
page.wait_for_selector('text=Upload Images', timeout=10000)
|
| 45 |
+
print("Upload Images button found.")
|
| 46 |
+
|
| 47 |
+
# Take screenshot
|
| 48 |
+
os.makedirs("/home/jules/verification", exist_ok=True)
|
| 49 |
+
page.screenshot(path="/home/jules/verification/hf_live_test.png", full_page=True)
|
| 50 |
+
print("Screenshot saved.")
|
| 51 |
+
|
| 52 |
+
browser.close()
|
| 53 |
+
|
| 54 |
+
if __name__ == "__main__":
|
| 55 |
+
run()
|
verify_live_v2.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from playwright.sync_api import sync_playwright
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
def run():
|
| 5 |
+
with sync_playwright() as p:
|
| 6 |
+
browser = p.chromium.launch(headless=True)
|
| 7 |
+
page = browser.new_page()
|
| 8 |
+
|
| 9 |
+
url = "https://auxteam-usersyncinterface.hf.space"
|
| 10 |
+
print(f"Navigating to {url}...")
|
| 11 |
+
try:
|
| 12 |
+
page.goto(url, timeout=90000)
|
| 13 |
+
|
| 14 |
+
# Wait for app to load
|
| 15 |
+
page.wait_for_selector('text=Branding Content Testing', timeout=60000)
|
| 16 |
+
print("Page loaded successfully.")
|
| 17 |
+
|
| 18 |
+
# Take screenshot of landing
|
| 19 |
+
os.makedirs("/home/jules/verification", exist_ok=True)
|
| 20 |
+
page.screenshot(path="/home/jules/verification/hf_landing.png")
|
| 21 |
+
|
| 22 |
+
# Check for Info Box
|
| 23 |
+
if page.locator('text=Configuration Required').is_visible():
|
| 24 |
+
print("Info box visible.")
|
| 25 |
+
else:
|
| 26 |
+
print("Info box NOT visible.")
|
| 27 |
+
|
| 28 |
+
# Click Open Global Chat
|
| 29 |
+
print("Clicking Open Global Chat...")
|
| 30 |
+
page.click('text=Open Global Chat')
|
| 31 |
+
|
| 32 |
+
# Wait for Chat Page
|
| 33 |
+
page.wait_for_timeout(2000) # give it some time
|
| 34 |
+
page.screenshot(path="/home/jules/verification/hf_chat_attempt.png")
|
| 35 |
+
|
| 36 |
+
if page.locator('text=New Simulation').is_visible():
|
| 37 |
+
print("Chat page visible.")
|
| 38 |
+
else:
|
| 39 |
+
print("Chat page NOT visible according to text search.")
|
| 40 |
+
|
| 41 |
+
# Check for Send button
|
| 42 |
+
if page.locator('text=Send').is_visible():
|
| 43 |
+
print("Send button visible.")
|
| 44 |
+
|
| 45 |
+
except Exception as e:
|
| 46 |
+
print(f"Error during verification: {e}")
|
| 47 |
+
page.screenshot(path="/home/jules/verification/hf_error.png")
|
| 48 |
+
|
| 49 |
+
browser.close()
|
| 50 |
+
|
| 51 |
+
if __name__ == "__main__":
|
| 52 |
+
run()
|