This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ludwig.api import LudwigModel | |
import pandas | |
df = pandas.read_csv('rotten_tomatoes.csv') | |
model = LudwigModel(config='rotten_tomatoes.yaml') | |
results = model.train(dataset=df) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_features: | |
- name: genres | |
type: set | |
preprocessing: | |
tokenizer: comma | |
- name: content_rating | |
type: category | |
- name: top_critic | |
type: binary | |
- name: runtime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_features: | |
- name: genres | |
type: set | |
- name: content_rating | |
type: category | |
- name: top_critic | |
type: binary | |
- name: runtime | |
type: number | |
- name: review_content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model_type: llm | |
base_model: meta-llama/Llama-2-7b-hf | |
quantization: | |
bits: 4 | |
adapter: | |
type: lora | |
prompt: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
import json | |
from apiKey import apikey | |
from apiKey import serpapi | |
import yfinance as yf | |
from yahooquery import Ticker | |
import openai | |
os.environ["SERPAPI_API_KEY"] = serpapi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import matplotlib.pyplot as plt | |
from financial_analyst import financial_analyst | |
def main(): | |
st.title("AI Financial Analyst App") | |
company_name = st.text_input("Company name:") | |
analyze_button = st.button("Analyze") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'selenium-webdriver' | |
require 'webdrivers' | |
require 'yaml' | |
require 'json' | |
chromedriver_path = '/Users/fsndzomga/Downloads/chromedriver-mac-arm64/chromedriver' | |
Selenium::WebDriver::Chrome::Service.driver_path = chromedriver_path | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'dotenv' | |
require 'ruby/openai' | |
Dotenv.load | |
class IdeaGeneratorService | |
def initialize(industry, location) | |
@industry = industry | |
@location = location | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WebApp: | |
def __init__(self): | |
self.data = {} | |
def fetch_data(self, url): | |
# code to fetch data from a URL | |
self.data = {"example": "data"} | |
def process_data(self): | |
# code to process data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DataFetcher: | |
def fetch_data(self, url): | |
# code to fetch data from a URL | |
return {"example": "data"} | |
class DataProcessor: | |
def process_data(self, data): | |
# code to process data | |
return {k: v.upper() for k, v in data.items()} |