File size: 731 Bytes
956a6ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
from brain_strom_with_influencer_input import ResponseGeneratorApp
from recommendations_and_engagement_predict import StoryRecommendationApp

# Instantiate the two apps
brainstorm_app = ResponseGeneratorApp().build_ui()
print("Brainstorm App:", type(brainstorm_app))

recommendation_app = StoryRecommendationApp().launch_interface()
print("Recommendation App:", type(recommendation_app))


# Combine the two apps into a tabbed interface
app = gr.TabbedInterface(
    [brainstorm_app, recommendation_app],  # List of apps/interfaces
    ["Brainstorm with Influencer Input", "Recommendations with Engagement Predictions"],  # Tab names
)

if __name__ == "__main__":
    app.launch(share=True)