Spaces:
Running
Running
gorkemgoknar
commited on
Commit
•
1ded687
1
Parent(s):
5e592a5
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,8 @@ tokenizer = GPT2Tokenizer.from_pretrained('gorkemgoknar/gpt2chatbotenglish')
|
|
13 |
tokenizer.model_max_length = 1024
|
14 |
|
15 |
#Dynamic Temperature
|
|
|
|
|
16 |
base_temperature = 1.3
|
17 |
dynamic_temperature_range = 0.15
|
18 |
|
@@ -134,12 +136,13 @@ css="""
|
|
134 |
personality_choices = ["Gandalf", "Riddick", "Macleod", "Morpheus", "Neo","Spock","Vader","Indy", "Ig-11","Threepio","Tony Stark","Batman","Vizzini"]
|
135 |
title = "Metayazar - Movie Chatbot"
|
136 |
description = "Chat with your favorite movie characters. This space demo has simple interface and simple history as gradio's state did not work need to make a global history, you will have different responses as same gradio machine will be used! Test it out in metayazar.com/chatbot for more movie/character options and history memorized."
|
|
|
137 |
|
138 |
#History not implemented in this demo, use metayazar.com/chatbot for a movie and character dropdown chat interface
|
139 |
##interface = gr.Interface(fn=greet, inputs=[gr.inputs.Dropdown(personality_choices) ,"text"], title=title, description=description, outputs="text")
|
140 |
|
141 |
history = {"character": "None", "message_history" : [] }
|
142 |
-
interface= gr.Interface(fn=greet, inputs=[gr.inputs.Dropdown(personality_choices) ,"text"], outputs="html",css=css, title=title, description=description)
|
143 |
|
144 |
|
145 |
if __name__ == "__main__":
|
13 |
tokenizer.model_max_length = 1024
|
14 |
|
15 |
#Dynamic Temperature
|
16 |
+
#See experiment https://www.linkedin.com/pulse/ai-goes-job-interview-g%25C3%25B6rkem-g%25C3%25B6knar
|
17 |
+
|
18 |
base_temperature = 1.3
|
19 |
dynamic_temperature_range = 0.15
|
20 |
|
136 |
personality_choices = ["Gandalf", "Riddick", "Macleod", "Morpheus", "Neo","Spock","Vader","Indy", "Ig-11","Threepio","Tony Stark","Batman","Vizzini"]
|
137 |
title = "Metayazar - Movie Chatbot"
|
138 |
description = "Chat with your favorite movie characters. This space demo has simple interface and simple history as gradio's state did not work need to make a global history, you will have different responses as same gradio machine will be used! Test it out in metayazar.com/chatbot for more movie/character options and history memorized."
|
139 |
+
article = "<p style='text-align: center'><a href='https://www.linkedin.com/pulse/ai-goes-job-interview-g%C3%B6rkem-g%C3%B6knar/'>AI Goes to Job Interview</a> | <a href='https://www.linkedin.com/in/goknar/'>Görkem Göknar</a></p>"
|
140 |
|
141 |
#History not implemented in this demo, use metayazar.com/chatbot for a movie and character dropdown chat interface
|
142 |
##interface = gr.Interface(fn=greet, inputs=[gr.inputs.Dropdown(personality_choices) ,"text"], title=title, description=description, outputs="text")
|
143 |
|
144 |
history = {"character": "None", "message_history" : [] }
|
145 |
+
interface= gr.Interface(fn=greet, inputs=[gr.inputs.Dropdown(personality_choices) ,"text"], outputs="html",css=css, title=title, description=description,article=article )
|
146 |
|
147 |
|
148 |
if __name__ == "__main__":
|