Spaces:
Sleeping
Sleeping
Dacho688
commited on
Commit
·
551e5f1
1
Parent(s):
c2de0ec
Clean up
Browse files- app.py +4 -16
- streaming.py +1 -1
app.py
CHANGED
@@ -1,10 +1,3 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
2 |
-
"""
|
3 |
-
Created on Thu Aug 1 19:04:11 2024
|
4 |
-
|
5 |
-
@author: rkram
|
6 |
-
"""
|
7 |
-
|
8 |
import os
|
9 |
import gradio as gr
|
10 |
from transformers import HfEngine, Tool,CodeAgent,load_tool
|
@@ -58,7 +51,10 @@ with gr.Blocks(
|
|
58 |
secondary_hue=gr.themes.colors.yellow,
|
59 |
)
|
60 |
) as demo:
|
61 |
-
gr.Markdown("""# Image Generator
|
|
|
|
|
|
|
62 |
chatbot = gr.Chatbot(
|
63 |
label="ImageBot",
|
64 |
type="messages",
|
@@ -71,14 +67,6 @@ with gr.Blocks(
|
|
71 |
label="What image would you like to generate?"
|
72 |
)
|
73 |
submit = gr.Button("Run", variant="primary")
|
74 |
-
|
75 |
-
# gr.Examples(
|
76 |
-
# examples=[["./example/titanic.csv", example_notes]],
|
77 |
-
# inputs=[file_input, text_input],
|
78 |
-
# cache_examples=False,
|
79 |
-
# label='Click anywhere below to try this example.'
|
80 |
-
# )
|
81 |
-
|
82 |
submit.click(interact_with_agent, [text_input], [chatbot])
|
83 |
|
84 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
from transformers import HfEngine, Tool,CodeAgent,load_tool
|
|
|
51 |
secondary_hue=gr.themes.colors.yellow,
|
52 |
)
|
53 |
) as demo:
|
54 |
+
gr.Markdown("""# Image Generator (CodeAgent) 🖼️
|
55 |
+
|
56 |
+
**Runwayml/stable-diffusion-v1-5 w/Gradio prompt generator tool.**
|
57 |
+
""")
|
58 |
chatbot = gr.Chatbot(
|
59 |
label="ImageBot",
|
60 |
type="messages",
|
|
|
67 |
label="What image would you like to generate?"
|
68 |
)
|
69 |
submit = gr.Button("Run", variant="primary")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
submit.click(interact_with_agent, [text_input], [chatbot])
|
71 |
|
72 |
if __name__ == "__main__":
|
streaming.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from transformers.agents.agent_types import AgentAudio, AgentImage, AgentText, AgentType
|
2 |
-
from transformers.agents import
|
3 |
import spaces
|
4 |
|
5 |
|
|
|
1 |
from transformers.agents.agent_types import AgentAudio, AgentImage, AgentText, AgentType
|
2 |
+
from transformers.agents import CodeAgent
|
3 |
import spaces
|
4 |
|
5 |
|