Yashnik commited on
Commit
1331a68
·
verified ·
1 Parent(s): 0cee3ed

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline, Conversation
2
+ import gradio as gr
3
+
4
+ chatbot = pipeline(model="bigcode/starcoder2-15b")
5
+
6
+ message_list = []
7
+ response_list = []
8
+
9
+ def vanilla_chatbot(message, history):
10
+ conversation = chatbot(message)
11
+
12
+ return conversation[0]['generated_text']
13
+
14
+ demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="YourCoder Chatbot", description="Enter piece of code to generate a code review!")
15
+
16
+ demo_chatbot.launch()