Spaces:
Sleeping
Sleeping
Update app.py
Browse files48 unmodified lines4950515253545556575859606162636465666768697071727374757648 unmodified linesreturn "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 tokenstemperature=0.5,model_id='mistralai/Mistral-7B-Instruct', # Nuevo modelo recomendadocustom_role_conversions=None,)48 unmodified lines495051525354555657585948 unmodified linesreturn "Alert could not be assigned automatically. Please check manually."model = HfApiModel(max_tokens=2096,temperature=0.5,model_id='Qwen/Qwen2.5-Coder-32B-Instruct',custom_role_conversions=None,)
app.py+2-19