N.Achyuth Reddy commited on
Commit
2f3bcec
·
1 Parent(s): fbb4bc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -56,8 +56,6 @@ def predict(message, system_prompt='Your name is OpenGPT. You are developed by A
56
  )
57
  st.write("Done")
58
  return response
59
- # Example usage
60
- text_to_speech(response)
61
 
62
  # Streamlit UI
63
  st.title(TITLE)
@@ -122,7 +120,20 @@ def text_to_speech(text, language='en', filename='output.mp3'):
122
  # Play the audio file
123
  os.system(f'start {filename}') # This works on Windows. For other OS, you might need a different command.
124
 
125
-
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
 
128
-
 
 
56
  )
57
  st.write("Done")
58
  return response
 
 
59
 
60
  # Streamlit UI
61
  st.title(TITLE)
 
120
  # Play the audio file
121
  os.system(f'start {filename}') # This works on Windows. For other OS, you might need a different command.
122
 
123
+
124
+ response = client.predict(
125
+ message, # str in 'Message' Textbox component
126
+ system_prompt, # str in 'Optional system prompt' Textbox component
127
+ max_new_tokens, # int | float (numeric value between 0 and 4096)
128
+ temperature, # int | float (numeric value between 0.0 and 1.0)
129
+ Topp,
130
+ 500,
131
+ Repetitionpenalty, # int | float (numeric value between 1.0 and 2.0)
132
+ api_name="/chat"
133
+ )
134
+ st.write("Done")
135
+ return response
136
 
137
 
138
+ # Example usage
139
+ text_to_speech(response)