Spaces:
Build error
Build error
Commit
·
058ac7e
1
Parent(s):
e873ee1
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,6 @@ import re
|
|
| 3 |
import textwrap
|
| 4 |
import openai
|
| 5 |
import gradio as gr
|
| 6 |
-
from google.colab import files
|
| 7 |
|
| 8 |
def gpt3_completion(prompt, engine='text-davinci-002', temp=0.6, top_p=1.0, tokens=1000, freq_pen=0.25, pres_pen=0.0, stop=['<<END>>']):
|
| 9 |
print("here");
|
|
@@ -67,12 +66,6 @@ def summarize_podcast(podcast):
|
|
| 67 |
tempstr=tempstr+"\n"+summary
|
| 68 |
return str(tempstr)
|
| 69 |
|
| 70 |
-
|
| 71 |
-
uploaded = files.upload()
|
| 72 |
-
|
| 73 |
-
for filename in uploaded.keys():
|
| 74 |
-
print(f"User uploaded file with name '{filename}' and length {len(uploaded[filename])} bytes")
|
| 75 |
-
file_contents = uploaded[filename].decode('utf-8')
|
| 76 |
|
| 77 |
input_file = gr.inputs.File(label="Upload your podcast in VTT format.")
|
| 78 |
|
|
|
|
| 3 |
import textwrap
|
| 4 |
import openai
|
| 5 |
import gradio as gr
|
|
|
|
| 6 |
|
| 7 |
def gpt3_completion(prompt, engine='text-davinci-002', temp=0.6, top_p=1.0, tokens=1000, freq_pen=0.25, pres_pen=0.0, stop=['<<END>>']):
|
| 8 |
print("here");
|
|
|
|
| 66 |
tempstr=tempstr+"\n"+summary
|
| 67 |
return str(tempstr)
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
input_file = gr.inputs.File(label="Upload your podcast in VTT format.")
|
| 71 |
|