Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from freeGPT import Client
|
| 3 |
+
|
| 4 |
+
st.title("Dude AI - Your stupid assistant")
|
| 5 |
+
st.header("Type any message and get stupid response", divider="rainbow")
|
| 6 |
+
messages = st.container(height=600)
|
| 7 |
+
prompt = st.chat_input(placeholder="Eg. How are you today?")
|
| 8 |
+
|
| 9 |
+
if prompt:
|
| 10 |
+
resp = Client.create_completion("gpt3", prompt + " . Give answer as very stupid dude guy, as stupid and funny as it can be. I should laugh when i'll read answer")
|
| 11 |
+
user_msg = messages.message("user")
|
| 12 |
+
user_msg.write(prompt)
|
| 13 |
+
resp_msg = messages.message("assistant", avatar="avatar.jpg")
|
| 14 |
+
resp_msg.write(resp)
|