ysharma HF staff commited on
Commit
5b77c66
1 Parent(s): 509df4e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+ import gradio as gr
3
+
4
+ def alternatingly_agree(message, history):
5
+ if len(history) % 2 == 0:
6
+ return f"Yes, I do think that '{message}'"
7
+ else:
8
+ return "I don't think so"
9
+
10
+ placeholder = """
11
+ <img src="https://huggingface.co/spaces/ysharma/CodeGemma/resolve/main/gemma_lockup_vertical_full-color_rgb.png" style="width:40%">
12
+ <b>CodeGemma-7B-IT</b>
13
+ """
14
+
15
+ gr.ChatInterface(alternatingly_agree, placeholder=placeholder).launch()