prithivMLmods commited on
Commit
2802027
·
verified ·
1 Parent(s): 37430fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -11
app.py CHANGED
@@ -1,10 +1,6 @@
1
  import gradio as gr
2
- from spaces import spaces
3
 
4
- # Assign GPU to the overall spaces
5
- @spaces.GPU(queue=False)
6
  def main():
7
-
8
  # Define the components using the specified URLs
9
  with gr.Blocks() as chatbot:
10
  gr.HTML("<iframe src='https://huggingface.co/spaces/prithivMLmods/Mistral-7B-Instruct-v0.3' width='100%' height='1000px' style='border-radius: 8px;'></iframe>")
@@ -25,15 +21,37 @@ def main():
25
  gr.HTML("<iframe src='https://huggingface.co/spaces/prithivMLmods/Face-Swap-Roop' width='100%' height='1000px' style='border-radius: 8px;'></iframe>")
26
 
27
  # Assemble the components into a single Gradio interface
28
- with gr.Blocks(theme=gr.themes.Soft(), title="ChatGPT-Omni") as demo:
29
- gr.Markdown("# ChatGPT-Omni")
30
- gr.TabbedInterface(
31
- [chatbot, imagegpt, imageengine4k, imageengine2k, mediadownloader, photofakes],
32
- ['ChatBot', 'ImageGPT', 'Image Engine 4K', 'Image Engine 2K', 'Media Downloader', 'PhotoFakes']
33
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  # Launch the demo
36
- demo.queue().launch(debug=True)
37
 
38
  # Run the main function
39
  main()
 
1
  import gradio as gr
 
2
 
 
 
3
  def main():
 
4
  # Define the components using the specified URLs
5
  with gr.Blocks() as chatbot:
6
  gr.HTML("<iframe src='https://huggingface.co/spaces/prithivMLmods/Mistral-7B-Instruct-v0.3' width='100%' height='1000px' style='border-radius: 8px;'></iframe>")
 
21
  gr.HTML("<iframe src='https://huggingface.co/spaces/prithivMLmods/Face-Swap-Roop' width='100%' height='1000px' style='border-radius: 8px;'></iframe>")
22
 
23
  # Assemble the components into a single Gradio interface
24
+ demo = gr.Interface(
25
+ fn=None,
26
+ title="ChatGPT-Omni",
27
+ theme="soft",
28
+ layout="tabbed",
29
+ description="A collection of AI models for various tasks.",
30
+ inputs=None,
31
+ outputs=None,
32
+ allow_flagging=False,
33
+ live=False,
34
+ share=False,
35
+ capture_session=False,
36
+ server_name=None,
37
+ examples=None,
38
+ interpretation=None,
39
+ preprocessing_fns=None,
40
+ postprocessing_fns=None,
41
+ server_port=None,
42
+ server_port_random=False,
43
+ verbose=False,
44
+ analytics_enabled=True,
45
+ analytics_name=None,
46
+ analytics_endpoint=None,
47
+ analytics_app_id=None,
48
+ analytics_session_id=None,
49
+ analytics_use_ua=False,
50
+ gpu=True # Enable GPU support
51
+ )
52
 
53
  # Launch the demo
54
+ demo.launch()
55
 
56
  # Run the main function
57
  main()