Samhugs07 commited on
Commit
bfc5a28
·
1 Parent(s): e44b17b

Updated audio function

Browse files
Files changed (1) hide show
  1. app.py +0 -20
app.py CHANGED
@@ -99,11 +99,7 @@ def artist(event_text):
99
  return Image.open(BytesIO(image_data))
100
 
101
 
102
- <<<<<<< HEAD
103
  # In[34]:
104
- =======
105
- # In[25]:
106
- >>>>>>> b5f01cd9f42caa511e6d6ae9b7e1a791abf5b6e0
107
 
108
 
109
  import base64
@@ -119,19 +115,11 @@ def talker(message):
119
 
120
  audio_stream = BytesIO(response.content)
121
  output_filename = "output_audio.mp3"
122
- <<<<<<< HEAD
123
 
124
  with open(output_filename, "wb") as f:
125
  f.write(audio_stream.read())
126
  return output_filename
127
  #Commented below just for Huggingface deployment
128
- =======
129
- return output_filename
130
- #Commented below just for Huggingface deployment
131
- # with open(output_filename, "wb") as f:
132
- # f.write(audio_stream.read())
133
-
134
- >>>>>>> b5f01cd9f42caa511e6d6ae9b7e1a791abf5b6e0
135
  # # Play the generated audio
136
  # display(Audio(output_filename, autoplay=True))
137
 
@@ -546,11 +534,7 @@ def process_chosen_model(chatbot, model):
546
 
547
 
548
 
549
- <<<<<<< HEAD
550
  # In[35]:
551
- =======
552
- # In[32]:
553
- >>>>>>> b5f01cd9f42caa511e6d6ae9b7e1a791abf5b6e0
554
 
555
 
556
  # More involved Gradio code as we're not using the preset Chat interface!
@@ -601,11 +585,7 @@ with gr.Blocks(css="""
601
  clear.click(lambda: None, inputs=None, outputs=chatbot, queue=False)
602
 
603
 
604
- <<<<<<< HEAD
605
  # In[36]:
606
- =======
607
- # In[33]:
608
- >>>>>>> b5f01cd9f42caa511e6d6ae9b7e1a791abf5b6e0
609
 
610
 
611
  ui.launch(inbrowser=True)
 
99
  return Image.open(BytesIO(image_data))
100
 
101
 
 
102
  # In[34]:
 
 
 
103
 
104
 
105
  import base64
 
115
 
116
  audio_stream = BytesIO(response.content)
117
  output_filename = "output_audio.mp3"
 
118
 
119
  with open(output_filename, "wb") as f:
120
  f.write(audio_stream.read())
121
  return output_filename
122
  #Commented below just for Huggingface deployment
 
 
 
 
 
 
 
123
  # # Play the generated audio
124
  # display(Audio(output_filename, autoplay=True))
125
 
 
534
 
535
 
536
 
 
537
  # In[35]:
 
 
 
538
 
539
 
540
  # More involved Gradio code as we're not using the preset Chat interface!
 
585
  clear.click(lambda: None, inputs=None, outputs=chatbot, queue=False)
586
 
587
 
 
588
  # In[36]:
 
 
 
589
 
590
 
591
  ui.launch(inbrowser=True)