Patrick Rathje commited on
Commit ·
dc0af82
1
Parent(s): 0160fe0
wip
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ if os.environ.get("HF_TOKEN"):
|
|
| 18 |
api_key=os.environ["HF_TOKEN"],
|
| 19 |
)
|
| 20 |
|
| 21 |
-
def generate(promt, history, code):
|
| 22 |
print(promt, history, code)
|
| 23 |
completion = client.chat.completions.create(
|
| 24 |
model=MODEL,
|
|
@@ -39,7 +39,7 @@ else:
|
|
| 39 |
pipe.to('cuda')
|
| 40 |
|
| 41 |
@spaces.GPU
|
| 42 |
-
def generate(promt, history, code):
|
| 43 |
pass
|
| 44 |
|
| 45 |
|
|
@@ -66,11 +66,7 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as app:
|
|
| 66 |
with gr.Column():
|
| 67 |
gr.Markdown("## Chat")
|
| 68 |
chat = gr.ChatInterface(fn=generate, type="messages", additional_inputs=[code, logs], additional_outputs=[player, code, logs])
|
| 69 |
-
|
| 70 |
-
gr.Markdown("### TypeScript Code for Your Scene")
|
| 71 |
-
code.render()
|
| 72 |
-
logs.render()
|
| 73 |
-
|
| 74 |
with gr.Column():
|
| 75 |
gr.Markdown("## Preview")
|
| 76 |
player.render()
|
|
|
|
| 18 |
api_key=os.environ["HF_TOKEN"],
|
| 19 |
)
|
| 20 |
|
| 21 |
+
def generate(promt, history, code, logs):
|
| 22 |
print(promt, history, code)
|
| 23 |
completion = client.chat.completions.create(
|
| 24 |
model=MODEL,
|
|
|
|
| 39 |
pipe.to('cuda')
|
| 40 |
|
| 41 |
@spaces.GPU
|
| 42 |
+
def generate(promt, history, code, logs):
|
| 43 |
pass
|
| 44 |
|
| 45 |
|
|
|
|
| 66 |
with gr.Column():
|
| 67 |
gr.Markdown("## Chat")
|
| 68 |
chat = gr.ChatInterface(fn=generate, type="messages", additional_inputs=[code, logs], additional_outputs=[player, code, logs])
|
| 69 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
with gr.Column():
|
| 71 |
gr.Markdown("## Preview")
|
| 72 |
player.render()
|