Spaces:
abhi99555
/
Runtime error

Abhishek kumar commited on
Commit
35ea3de
β€’
1 Parent(s): d532a4d

add transcribe

Browse files
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -1,25 +1,18 @@
1
  import gradio as gr
2
  import requests
3
- # from transcribe import transcribe
 
4
  from sentiment_analysis import sentiment_analyser
5
  from summary import summarizer
6
  from topic import topic_gen
7
  from data import data
8
 
9
- def transcribe2():
10
- response = requests.post("https://dwarkesh-whisper-speaker-recognition.hf.space/run/predict", json={
11
- "data": [
12
- {"name":"audio.wav","data":"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA="},
13
- 2,
14
- ]}).json()
15
-
16
- data = response["data"]
17
 
18
  def main(audio_file, number_of_speakers):
19
  # Audio to Text Converter
20
- # text_data = transcribe(audio_file, number_of_speakers)
21
- # print(text_data)
22
- text_data = data
23
  topic = topic_gen(text_data)[0]["generated_text"]
24
  summary = summarizer(text_data)[0]["summary_text"]
25
  sent_analy = sentiment_analyser(text_data)
 
1
  import gradio as gr
2
  import requests
3
+
4
+ from transcribe import transcribe
5
  from sentiment_analysis import sentiment_analyser
6
  from summary import summarizer
7
  from topic import topic_gen
8
  from data import data
9
 
 
 
 
 
 
 
 
 
10
 
11
  def main(audio_file, number_of_speakers):
12
  # Audio to Text Converter
13
+ text_data = transcribe(audio_file, number_of_speakers)
14
+ print(text_data)
15
+ # text_data = data
16
  topic = topic_gen(text_data)[0]["generated_text"]
17
  summary = summarizer(text_data)[0]["summary_text"]
18
  sent_analy = sentiment_analyser(text_data)