YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

import gradio as gr import openai import pyttsx3 from dotenv import load_dotenv import os load_dotenv()

openai.api_key = os.getenv("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")

messages=[ {"role": "system", "content": "You are a teacher"} ] def transcribe(audio): global messages file = open(audio, "rb") transcription = openai.Audio.transcribe("whisper-1", file) print(transcription) messages.append({"role": "user", "content": transcription["text"]}) response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=messages )

AImessage = response["choices"][0]["message"]["content"]
engine = pyttsx3.init()
engine.say(AImessage)
engine.runAndWait()
messages.append({"role": "assistant", "content": AImessage})
chat = ''
for message in messages:
    if message["role"] != 'system':
        chat += message["role"] + ':' + message["content"] + "\n\n"
return chat

ui = gr.Interface(fn=transcribe ,inputs=gr.Audio(source='microphone',type='filepath'), outputs='text')

ui.launch()

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.