Spaces:
Paused
Paused
kgupta21 commited on
Commit ·
a956d76
1
Parent(s): 3dd738a
local inference page with fixes to gpu with zerogpu
Browse files10 unmodified lines11121314151693 unmodified lines1101111121131141159 unmodified lines12512612712812913010 unmodified linesfrom threading import Threadfrom typing import Iteratorimport os# Set up logginglogging.basicConfig(level=logging.INFO)93 unmodified lineslogger.error(f"Error in report analysis: {str(e)}")return f"Error analyzing report: {str(e)}"def transcribe(inputs, task="transcribe"):"""Transcribe audio using Whisper"""if inputs is None:9 unmodified lineslogger.error(f"Error in transcription: {str(e)}")raise gr.Error(f"Transcription failed: {str(e)}")def analyze_with_llama(transcribed_text: str,ground_truth_findings: str,10 unmodified lines1112131415161793 unmodified lines1111121131141151161179 unmodified lines12712812913013113213310 unmodified linesfrom threading import Threadfrom typing import Iteratorimport osimport spaces# Set up logginglogging.basicConfig(level=logging.INFO)93 unmodified lineslogger.error(f"Error in report analysis: {str(e)}")return f"Error analyzing report: {str(e)}"@spaces.GPUdef transcribe(inputs, task="transcribe"):"""Transcribe audio using Whisper"""if inputs is None:9 unmodified lineslogger.error(f"Error in transcription: {str(e)}")raise gr.Error(f"Transcription failed: {str(e)}")@spaces.GPUdef analyze_with_llama(transcribed_text: str,ground_truth_findings: str,
app.py+3