KwabsHug commited on
Commit
ce0050d
·
verified ·
1 Parent(s): 6287463

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -6
app.py CHANGED
@@ -179,10 +179,26 @@ def geminiinferenceinstance(text):
179
  ]
180
  )
181
 
182
- response = chat_session.send_message(f"NBNB property name must be enclosed in double quotes. Use this as inspiration to make a pirate story aka keep same format to work with an existing app: /n/n{configcomptestexample} ")
183
-
 
184
  return response.text #print(response.text)
185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  #-----
187
 
188
  # Define the states
@@ -442,7 +458,13 @@ Error details: {str(error)}"""
442
  initgameinfo = start_game()
443
 
444
  with gr.Blocks() as geminiapidemo:
445
- with gr.Tab("Manual - Config With Assets"):
 
 
 
 
 
 
446
  gr.HTML("Placeholder as not complete yet (3D not supported, and time (esp need for audio)")
447
  with gr.Row():
448
  with gr.Column(scale=2):
@@ -486,8 +508,5 @@ with gr.Blocks() as geminiapidemo:
486
  inputs=[wacustom_config, wamediabool],
487
  outputs=[waerror_box, wagame_log, wadescription, wachoices, wacustom_config, wagame_session, wamedia]
488
  )
489
- with gr.Accordion("Gemini Config", open=False):
490
- gr.Interface(geminiinferenceinstance, inputs=["text"], outputs=["text"], description="test generated config")
491
-
492
 
493
  geminiapidemo.queue().launch()
 
179
  ]
180
  )
181
 
182
+ #response = chat_session.send_message(f"NBNB property name must be enclosed in double quotes. Use this as inspiration to make a pirate story aka keep same format to work with an existing app: /n/n{configcomptestexample} ")
183
+ response = chat_session.send_message(text)
184
+
185
  return response.text #print(response.text)
186
 
187
+ def brainstormconsiderations(text)
188
+ Finaloutput = geminiinferenceinstance(text)
189
+
190
+ return Finaloutput
191
+
192
+ def generateconfig(text)
193
+ Finaloutput = geminiinferenceinstance(text)
194
+
195
+ return Finaloutput
196
+
197
+ def debugsuggestions(text)
198
+ Finaloutput = geminiinferenceinstance(text)
199
+
200
+ return Finaloutput
201
+
202
  #-----
203
 
204
  # Define the states
 
458
  initgameinfo = start_game()
459
 
460
  with gr.Blocks() as geminiapidemo:
461
+ with gr.Tab("Generate and Debug"):
462
+ gr.HTML("The user wants ")
463
+ with gr.Accordion("Gemini Config", open=False):
464
+ gr.Interface(brainstormconsiderations, inputs=["text"], outputs=["text"], description="some considerations for generated config")
465
+ gr.Interface(generateconfig, inputs=["text"], outputs=["text"], description=" generated config")
466
+ gr.Interface(debugsuggestions, inputs=["text"], outputs=["text"], description="debug generated config")
467
+ with gr.Tab("Manual - Config With Assets"):
468
  gr.HTML("Placeholder as not complete yet (3D not supported, and time (esp need for audio)")
469
  with gr.Row():
470
  with gr.Column(scale=2):
 
508
  inputs=[wacustom_config, wamediabool],
509
  outputs=[waerror_box, wagame_log, wadescription, wachoices, wacustom_config, wagame_session, wamedia]
510
  )
 
 
 
511
 
512
  geminiapidemo.queue().launch()