Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ openai_model = "gpt-3.5-turbo-0125"
|
|
| 21 |
################# End OpenAI-SPECIFIC VALUES ######################
|
| 22 |
|
| 23 |
tx = os.getenv("TX")
|
| 24 |
-
prefix = "
|
| 25 |
|
| 26 |
############### CHAT ###################
|
| 27 |
def predict(user_input, history):
|
|
@@ -37,7 +37,7 @@ def predict(user_input, history):
|
|
| 37 |
transcript = file.read()
|
| 38 |
return transcript
|
| 39 |
except FileNotFoundError:
|
| 40 |
-
return "File
|
| 41 |
elif len(user_input) > max_length:
|
| 42 |
raise gr.Error(f"Input is TOO LONG. Max length is {max_length} characters. Try again.")
|
| 43 |
|
|
|
|
| 21 |
################# End OpenAI-SPECIFIC VALUES ######################
|
| 22 |
|
| 23 |
tx = os.getenv("TX")
|
| 24 |
+
prefix = "" # "data/" if local or not persistent in HF
|
| 25 |
|
| 26 |
############### CHAT ###################
|
| 27 |
def predict(user_input, history):
|
|
|
|
| 37 |
transcript = file.read()
|
| 38 |
return transcript
|
| 39 |
except FileNotFoundError:
|
| 40 |
+
return "File " + transcript_file_path + " not found."
|
| 41 |
elif len(user_input) > max_length:
|
| 42 |
raise gr.Error(f"Input is TOO LONG. Max length is {max_length} characters. Try again.")
|
| 43 |
|