Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import time
|
|
@@ -15,25 +37,17 @@ import traceback
|
|
| 15 |
from pathlib import Path
|
| 16 |
|
| 17 |
# Import Agno components - using phi package
|
| 18 |
-
from phi.agent import Agent
|
| 19 |
-
from phi.model.google import Gemini
|
| 20 |
-
from phi.utils.log import logger
|
| 21 |
-
|
| 22 |
-
# For backward compatibility, try agno if phi not available
|
| 23 |
try:
|
| 24 |
-
from
|
| 25 |
-
from
|
| 26 |
-
from
|
| 27 |
-
# Use agno version if available
|
| 28 |
-
Agent = AgnoAgent
|
| 29 |
-
Gemini = AgnoGemini
|
| 30 |
-
logger = agno_logger
|
| 31 |
except ImportError:
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
import
|
| 36 |
-
|
|
|
|
| 37 |
|
| 38 |
class CustomZoomTool:
|
| 39 |
def __init__(self, *, account_id: Optional[str] = None, client_id: Optional[str] = None,
|
|
@@ -384,7 +398,7 @@ def analyze_resume(
|
|
| 384 |
"""
|
| 385 |
)
|
| 386 |
|
| 387 |
-
# Handle
|
| 388 |
assistant_message = None
|
| 389 |
if hasattr(response, 'messages'):
|
| 390 |
for msg in response.messages:
|
|
|
|
| 1 |
+
import sys
|
| 2 |
+
import warnings
|
| 3 |
+
warnings.filterwarnings('ignore')
|
| 4 |
+
|
| 5 |
+
# Python 3.13 audioop workaround
|
| 6 |
+
if sys.version_info >= (3, 13):
|
| 7 |
+
try:
|
| 8 |
+
import audioop
|
| 9 |
+
except ImportError:
|
| 10 |
+
# Create a dummy audioop module
|
| 11 |
+
import types
|
| 12 |
+
audioop = types.ModuleType('audioop')
|
| 13 |
+
sys.modules['audioop'] = audioop
|
| 14 |
+
# Add minimal required functions
|
| 15 |
+
for func in ['add', 'adpcm2lin', 'adpcm32lin', 'alaw2lin', 'avg', 'avgpp',
|
| 16 |
+
'bias', 'cross', 'findfactor', 'findfit', 'findmax', 'getsample',
|
| 17 |
+
'lin2adpcm', 'lin2alaw', 'lin2ulaw', 'max', 'maxpp', 'mul', 'ratecv',
|
| 18 |
+
'reverse', 'rms', 'tomono', 'tostereo', 'ulaw2lin']:
|
| 19 |
+
setattr(audioop, func, lambda *args, **kwargs: b'')
|
| 20 |
+
sys.modules['pyaudioop'] = audioop
|
| 21 |
+
|
| 22 |
+
# Now import gradio
|
| 23 |
import gradio as gr
|
| 24 |
import os
|
| 25 |
import time
|
|
|
|
| 37 |
from pathlib import Path
|
| 38 |
|
| 39 |
# Import Agno components - using phi package
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
try:
|
| 41 |
+
from phi.agent import Agent
|
| 42 |
+
from phi.model.google import Gemini
|
| 43 |
+
from phi.utils.log import logger
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
except ImportError:
|
| 45 |
+
try:
|
| 46 |
+
from agno.agent import Agent
|
| 47 |
+
from agno.models.google import Gemini
|
| 48 |
+
from agno.utils.log import logger
|
| 49 |
+
except ImportError:
|
| 50 |
+
raise ImportError("Please install phidata or agno package")
|
| 51 |
|
| 52 |
class CustomZoomTool:
|
| 53 |
def __init__(self, *, account_id: Optional[str] = None, client_id: Optional[str] = None,
|
|
|
|
| 398 |
"""
|
| 399 |
)
|
| 400 |
|
| 401 |
+
# Handle response
|
| 402 |
assistant_message = None
|
| 403 |
if hasattr(response, 'messages'):
|
| 404 |
for msg in response.messages:
|