



'''simple docstring'''

# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ..models.whisper import WhisperForConditionalGeneration, WhisperProcessor
from .base import PipelineTool


class       a__				( __A      ):







				"""simple docstring"""



				__UpperCamelCase    :		Dict	=	'openai/whisper-base'
				__UpperCamelCase    :		Any	=	(
				    'This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the '
				    'transcribed text.'
				)
				__UpperCamelCase    :		Union[str, Any]	=	'transcriber'
				__UpperCamelCase    :		Tuple	=	WhisperProcessor
				__UpperCamelCase    :		Dict	=	WhisperForConditionalGeneration

				__UpperCamelCase    :		Optional[int]	=	['audio']
				__UpperCamelCase    :		Tuple	=	['text']




				def 					_snake_case  (self       ,			__lowercase		):
										return self.pre_processor(__UpperCamelCase       ,			return_tensors='''pt'''		).input_features




				def 					_snake_case  (self       ,			__lowercase		):
										return self.model.generate(inputs=__UpperCamelCase		)




				def 					_snake_case  (self       ,			__lowercase		):
										return self.pre_processor.batch_decode(__UpperCamelCase       ,			skip_special_tokens=__UpperCamelCase		)[0]





'''simple docstring'''

import requests
from bsa import BeautifulSoup

def 							__magic_name__(						lowerCamelCase,				lowerCamelCase):
						__lowerCAmelCase							       =				BeautifulSoup(requests.get(lowerCamelCase,				params=lowerCamelCase).content,				'''html.parser''')
						__lowerCAmelCase							       =				soup.find('''div''',				attrs={'''class''': '''gs_ri'''})
						__lowerCAmelCase							       =				div.find('''div''',				attrs={'''class''': '''gs_fl'''}).find_all('''a''')
						return anchors[2].get_text()


if __name__ == "__main__":
	_UpperCAmelCase				: Union[str, Any]							    =				{
	    """title""": (
	        """Precisely geometry controlled microsupercapacitors for ultrahigh areal """
	        """capacitance, volumetric capacitance, and energy density"""
	    ),
	    """journal""": """Chem. Mater.""",
	    """volume""": 3_0,
	    """pages""": """3979-3990""",
	    """year""": 2_0_1_8,
	    """hl""": """en""",
	}
	print(get_citation("""https://scholar.google.com/scholar_lookup""", params=params))

