inventwithdean commited on
Commit
d72afc2
·
1 Parent(s): eefc538

add live stream

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .env
__pycache__/audience.cpython-310.pyc ADDED
Binary file (2.05 kB). View file
 
__pycache__/guard.cpython-310.pyc ADDED
Binary file (987 Bytes). View file
 
__pycache__/host.cpython-310.pyc ADDED
Binary file (2.54 kB). View file
 
__pycache__/image_api.cpython-310.pyc ADDED
Binary file (883 Bytes). View file
 
__pycache__/randomname.cpython-310.pyc ADDED
Binary file (625 Bytes). View file
 
__pycache__/timing.cpython-310.pyc ADDED
Binary file (1.52 kB). View file
 
__pycache__/tv_crew.cpython-310.pyc ADDED
Binary file (2.5 kB). View file
 
__pycache__/validity.cpython-310.pyc ADDED
Binary file (380 Bytes). View file
 
app.py CHANGED
@@ -12,6 +12,11 @@ import threading
12
  from timing import TimeManager
13
  from validity import is_valid_rpm_url
14
 
 
 
 
 
 
15
  api_key = os.getenv("API_KEY_OPENROUTER")
16
  client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=api_key)
17
 
@@ -49,7 +54,7 @@ def join_show(avatar_url):
49
  """
50
  if not is_valid_rpm_url(avatar_url):
51
  return "Invalid Avatar URL! Please make sure you are using a Ready Player Me .glb avatar URL."
52
-
53
  payload = {"avatar_url": avatar_url}
54
  headers = {"Content-Type": "application/json", "x-api-key": api_key_unreal}
55
  response = requests.post(
@@ -223,6 +228,27 @@ with gr.Blocks() as demo:
223
  name_input = gr.Text(
224
  "", label="Guest Name", info="Paste your guestname here!", max_lines=1
225
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  message_input = gr.Text(
227
  "",
228
  label="Your Message",
@@ -242,6 +268,38 @@ with gr.Blocks() as demo:
242
  outputs=[response],
243
  )
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
 
246
  if __name__ == "__main__":
247
  demo.launch(mcp_server=True)
 
12
  from timing import TimeManager
13
  from validity import is_valid_rpm_url
14
 
15
+ # Remove these to upload on Spaces
16
+ # import dotenv
17
+
18
+ # dotenv.load_dotenv()
19
+
20
  api_key = os.getenv("API_KEY_OPENROUTER")
21
  client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=api_key)
22
 
 
54
  """
55
  if not is_valid_rpm_url(avatar_url):
56
  return "Invalid Avatar URL! Please make sure you are using a Ready Player Me .glb avatar URL."
57
+
58
  payload = {"avatar_url": avatar_url}
59
  headers = {"Content-Type": "application/json", "x-api-key": api_key_unreal}
60
  response = requests.post(
 
228
  name_input = gr.Text(
229
  "", label="Guest Name", info="Paste your guestname here!", max_lines=1
230
  )
231
+ gr.HTML(
232
+ """
233
+ <div style="
234
+ position:relative;
235
+ padding-bottom: 40%;
236
+ width: 70%;
237
+ max-width: 100%;
238
+ height:0;
239
+ margin: 0 auto;
240
+ overflow: hidden;
241
+ ">
242
+ <iframe
243
+ style="position:absolute;
244
+ top:0%;
245
+ left:0%;
246
+ width:100%;
247
+ height:100%;"
248
+ src="https://www.youtube.com/embed/VhvLqnE1k5M?si=WSmI4Ypo8Bm3JbEO" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
249
+ </div>
250
+ """
251
+ )
252
  message_input = gr.Text(
253
  "",
254
  label="Your Message",
 
268
  outputs=[response],
269
  )
270
 
271
+ with gr.Tab("Bring your LLM!"):
272
+ gr.Markdown(
273
+ "To add this MCP to clients that support SSE (eg. Cursor, Windsurf, Cline), add the following to your MCP Config"
274
+ )
275
+ gr.Code(
276
+ """{
277
+ "mcpServers": {
278
+ "TheEmergentShow": {
279
+ "url": "https://mcp-1st-birthday-the-emergent-show.hf.space/gradio_api/mcp/"
280
+ }
281
+ }
282
+ }"""
283
+ )
284
+ gr.Markdown(
285
+ "STDIO Transport : For clients that only support stdio (eg. Claude Desktop), first install node.js. Then, you can use the following in your MCP Config"
286
+ )
287
+ gr.Code(
288
+ """{
289
+ "mcpServers": {
290
+ "TheEmergentShow": {
291
+ "command": "npx",
292
+ "args": [
293
+ "mcp-remote",
294
+ "https://mcp-1st-birthday-the-emergent-show.hf.space/gradio_api/mcp/sse",
295
+ "--transport",
296
+ "sse-only"
297
+ ]
298
+ }
299
+ }
300
+ }"""
301
+ )
302
+
303
 
304
  if __name__ == "__main__":
305
  demo.launch(mcp_server=True)