ayaanzaveri commited on
Commit
3058fd7
1 Parent(s): 2c301d8

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -11
main.py CHANGED
@@ -5,8 +5,6 @@ import yt_dlp
5
  import uuid
6
  import os
7
  from fastapi.middleware.cors import CORSMiddleware
8
- import gradio as gr
9
- from pyngrok import ngrok
10
 
11
  app = FastAPI()
12
 
@@ -18,11 +16,6 @@ app.add_middleware(
18
  allow_headers=["*"],
19
  )
20
 
21
- ngrok.set_auth_token("2NtE79QzuHf6t2uV7xiBni14GIx_L5YaQzN96KS61RWS9qi1")
22
- ngrok.kill()
23
- ngrok_tunnel = ngrok.connect(7860)
24
- print(ngrok_tunnel.public_url)
25
-
26
  # or run on GPU with INT8
27
  # model = WhisperModel(model_size, device="cuda", compute_type="int8_float16")
28
  # or run on CPU with INT8
@@ -60,7 +53,4 @@ async def transcribe_video(video_url: str, beam_size: int = 5, model_size: str =
60
  # print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
61
 
62
  # for segment in segments:
63
- # print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
64
-
65
- interface = gr.Interface(inputs="text",outputs="text", fn=ng_path, title="X", description="XX", allow_flagging=False)
66
- interface.launch()
 
5
  import uuid
6
  import os
7
  from fastapi.middleware.cors import CORSMiddleware
 
 
8
 
9
  app = FastAPI()
10
 
 
16
  allow_headers=["*"],
17
  )
18
 
 
 
 
 
 
19
  # or run on GPU with INT8
20
  # model = WhisperModel(model_size, device="cuda", compute_type="int8_float16")
21
  # or run on CPU with INT8
 
53
  # print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
54
 
55
  # for segment in segments:
56
+ # print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))