yash commited on
Commit
b7de1ae
·
1 Parent(s): ac733b6

add description

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import torch
3
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
4
  import gradio as gr
@@ -100,6 +99,19 @@ def reset_button():
100
  with gr.Blocks(css=".small-btn {width: 100px !important;} .large-textbox {width: 100% !important;}") as demo:
101
  gr.Markdown("# 🤖 AI Assistant")
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  with gr.Column():
104
  new_chat_button = gr.Button("Start New Chat")
105
  with gr.Row():
@@ -135,13 +147,3 @@ with gr.Blocks(css=".small-btn {width: 100px !important;} .large-textbox {width:
135
 
136
  # Launch the Gradio app
137
  demo.launch()
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
 
 
1
  import torch
2
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
3
  import gradio as gr
 
99
  with gr.Blocks(css=".small-btn {width: 100px !important;} .large-textbox {width: 100% !important;}") as demo:
100
  gr.Markdown("# 🤖 AI Assistant")
101
 
102
+ # Add instructions to the UI
103
+ gr.Markdown("""
104
+ ## Steps to Use the AI Assistant:
105
+
106
+ 1. **Start a New Chat**: Click the **'Start New Chat'** button to create a new session.
107
+ 2. **Send a Message**: Type your message in the input box and either press **Enter** or click **'Send'** to get a response from the AI.
108
+ 3. **View Available Sessions**: Click **'Get Available Session'** to list all your chat sessions.
109
+ 4. **Load an Old Session**: You can enter the previous session ID in the **'Load Session'** box and click **'Load Session'**.
110
+ 5. **Reset All Chats**: Click the **'Reset All'** button to clear all chat sessions and start fresh.
111
+
112
+ **Session ID**: Every new chat has a unique session ID, which you can use to return to previous conversations.
113
+ """)
114
+
115
  with gr.Column():
116
  new_chat_button = gr.Button("Start New Chat")
117
  with gr.Row():
 
147
 
148
  # Launch the Gradio app
149
  demo.launch()