Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
import os
|
3 |
+
# import gradio as gr
|
4 |
+
import streamlit as st
|
5 |
+
import configparser
|
6 |
+
import datetime
|
7 |
+
import atexit
|
8 |
+
|
9 |
+
# Define Streamlit app
|
10 |
+
def main():
|
11 |
+
st.title("AI Chat Application")
|
12 |
+
|
13 |
+
# Text input for user queries
|
14 |
+
user_query = st.text_area("Type your question here...")
|
15 |
+
|
16 |
+
if st.button("Ask"):
|
17 |
+
# Call your AI model function here with user_query as input
|
18 |
+
ai_response = ask_alans_ai(user_query)
|
19 |
+
|
20 |
+
# Display the AI response
|
21 |
+
st.write("AI Response:")
|
22 |
+
st.write(ai_response)
|
23 |
+
|
24 |
+
# Run the Streamlit app
|
25 |
+
if __name__ == "__main__":
|
26 |
+
main()
|