Spaces:
Running
Running
Create app.py
Browse files
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()
|