IliaLarchenko commited on
Commit
df25732
1 Parent(s): 2f839eb

Created interface

Browse files
Files changed (2) hide show
  1. app.py +31 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks() as demo:
4
+ gr.Markdown("Your coding interview practice AI assistant!")
5
+ with gr.Tab("Coding"):
6
+ chat_history = gr.State([])
7
+ previous_code = gr.State("")
8
+ with gr.Accordion("Settings") as init_acc:
9
+ requirements = gr.Textbox(
10
+ label="Requirements",
11
+ placeholder=(
12
+ "Write any requirements here in a plain text: topic, difficulty, complexity, etc. "
13
+ "Or keep it blank to just get a random question."
14
+ ),
15
+ )
16
+ start_btn = gr.Button("Start")
17
+ with gr.Accordion("Solution", open=True) as solution_acc:
18
+ with gr.Accordion("Problem description", open=True) as solution_acc:
19
+ description = gr.Markdown()
20
+ with gr.Row() as content:
21
+ with gr.Column(scale=2):
22
+ code = gr.Code(label="Solution", language="python", lines=20)
23
+ message = gr.Textbox(label="text", lines=1)
24
+ answer_btn = gr.Button("Send message")
25
+ with gr.Column(scale=1):
26
+ chat = gr.Chatbot(label="Chat history")
27
+ end_btn = gr.Button("Finish the interview")
28
+ with gr.Accordion("Feedback", open=True) as feedback_acc:
29
+ feedback = gr.Markdown()
30
+
31
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio