Spaces:
Sleeping
Sleeping
Update app.py
Browse files48 unmodified lines49505152535455565758596061626364656667685253715455735657585948 unmodified lines return "Alert could not be assigned automatically. Please check manually."
# Tool: Transcribe audio and generate a timeline using Hugging Face ASR@tooldef transcribe_audio(audio_path: str) -> str: """Transcribe audio and log events with timestamps. Args: audio_path: Path to the audio file. """ try: result = asr_pipeline(audio_path) transcript = result["text"] timestamped_events = [f"{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')} - {line}" for line in transcript.split('.')] return "\n".join(timestamped_events) except Exception as e: return f"Error transcribing audio: {str(e)}"
final_answer = FinalAnswerTool()
model = HfApiModel( max_tokens=1024, # Reducimos para evitar límite de tokens max_tokens=2096, temperature=0.5, model_id='mistralai/Mistral-7B-Instruct', # Nuevo modelo recomendado model_id='Qwen/Qwen2.5-Coder-32B-Instruct', custom_role_conversions=None,)
app.py+2-19