import gradio as gr
import os
import torch
import io
from pyannote.audio import Pipeline
from pyannote.audio import Audio
from pyannote.audio.pipelines.utils.hook import TimingHook
from pyannote.core import Segment

pipeline = Pipeline.from_pretrained(
  "pyannote/speaker-diarization-3.1",
  use_auth_token=os.environ['api'])



def greet(name, intensity):
    return "Hello, " + name + "!" * int(intensity)

demo = gr.Interface(
    fn=greet,
    inputs=["text", "slider"],
    outputs=["text"],
)

demo.launch()