Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions BUILDERS ALLIANCE/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Python files
*.py[cod]
__pycache__/
*.pyc
*.pyo
*.pyd
*.pydist

# FastAPI-specific files
*.log

## openai key
.env

# Node.js files
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Build directories
build/
dist/

# System files
.DS_Store
Thumbs.db

# IDE and editor files
.vscode/
.idea/
*.swp

# Docker
*.tar
.dockerignore
docker-compose.override.yml

# Dependency files
*.lock
package-lock.json

# Git ignore
!.gitignore
125 changes: 125 additions & 0 deletions BUILDERS ALLIANCE/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Terhal 🗺️⁀જ✈︎ 🇲🇦

<div align="center">
<img src = "./Terhal_bot.png" alt = "terhal logo" width = "300px" height = "300px" >
</div>

## Background and Problem Statement: 💢

Salma and Zineb are planning to visit 5 Moroccan cities during their 1-week vacation ⏳, but the real challenge is the planning process. They’ve learned that **for every week of travel**, they need **3 weeks of planing**, from **finding the best spots to visit to understanding transportation options** ˚˖𓍢ִ໋🍃˚.⛰️⋆☁️. Yet, they only speak **DARIJA**, which makes it hard for them to search in foreign languages. They tried **consulting a guide**, but it was **5 times more expensive than expected** and felt too **general**. This issue is holding them back 😟, and it’s affecting Morocco’s **tourism sector** 📉, which **contributes 7% of GDP**.

Do we really need weeks of prep for just 1 week of travel? And do we need to speak foreign languages to travel in our own country ⁉️


## Impact and Proposed Solution: 💡

Terhal is a chatbot 🤖 powered by LLMs (GPT-4 and Terjman), featuring an easy-to-use interface designed for Moroccan travelers passionate about using **DARIJA** while searching for the best places to visit in Morocco. It represents a brand-new way to help travelers find the best spots without investing too much time in preparation (time is money 💰). Not only that, it breaks down language barriers by incorporating the casual dialect **DARIJA** into the search. While built on existing solutions, Terhal combines the trio of **cost, quality, and time**, offering Moroccan travelers personalized recommendations in under 10 minutes, all in their mother tongue.

## Project Outcomes and Deliverables: 🎯

- **Finding the best spots** to visit in each city in Morocco.
- **Time reduction** in planning, cutting trip preparation from 3 weeks to just 10 minutes.
- **Personalized recommendations** to find the best places for each traveler's needs.
- **Moroccan Dialect Support**, Terhal is tailored for Moroccan travelers and can understand and interact with over 90% accuracy in DARIJA.
- **Simple Interface**, The interaction with Terhal is through Terhal Bot, a beginner-friendly user interface with simple components to enhance accessibility for all users.

## Instructions: 🛠️

The repository is organised following this layout:

```markdown

BUILDERS ALLIANCE/
├── code/
│ ├── ai_api_and_deployment/
│ │ ├── app/
│ │ ├── dataset/
│ │ ├── model/
│ │ ├── __init__.py
│ │ ├── main.py
│ │ ├── Dockerfile
│ │ ├── .env
│ │ └── requirements.txt
│ └── webApp/
│ ├── chat.html
│ ├── script.js
│ ├── styles.css
│ ├── requirements
│ └── package.json
|
├── presentation.pdf
├── demo
├── Terhal Logo
├── requirements.txt
├── .gitignore
└── README.md

```

### Prerequisites ⚙️

Before starting, ensure you have the following installed:
- **Python** (3.9 or later)
- **Node.js** (16.x or later) and **npm**
- **Docker** (optional, for containerized deployment)
- An internet connection to access the deployed AI API hosted on [Render](https://render.com) (free hosting).

---

### Installation and Setup

#### Clone the Repository

To begin, clone this repository to your local machine and navigate to the project folder:

```bash
git clone https://github.com/salmaelbarbori/2024-InnovAI-Hackathon/tree/main/BUILDERS%20ALLIANCE
cd 2024-InnovAI-Hackathon/BUILDERS%20ALLIANCE
```

#### Navigate to the **ai_api_and_deployment** folder:

```bash
cd builders/code/ai_api_and_deployment
```

Install the Python dependencies:

```bash
pip install -r requirements.txt
```

uvicorn main:app --reload

```bash
uvicorn main:app --reload
```

#### Run the Application

Install Python dependencies from the main requirements.txt:

```bash
Install Python dependencies from the main requirements.txt:
```

Navigate to the webApp folder and install npm dependencies:

```bash
cd builders/code/webApp
npm install
```

Run the Application : 🔮

```bash
node proxy-server.js
```

## Pitch 🎤

[Terhal Pitch](https://drive.google.com/file/d/10b7Zw1034V-roZMKNyduOkKAPS2VeWRz/view?usp=sharing)

## Demo 🔮

[Terhal Bot](https://drive.google.com/file/d/1JIDRnFU8lKGONttrHCC4TfDb2P7j8hXG/view?usp=sharing)
Binary file added BUILDERS ALLIANCE/Terhal_bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions BUILDERS ALLIANCE/code/ai_api_and_deployment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
20 changes: 20 additions & 0 deletions BUILDERS ALLIANCE/code/ai_api_and_deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use the official Python image from Docker Hub
FROM python:3.9-slim

# Set the working directory
WORKDIR /app

# Copy the requirements file
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code
COPY . .

# Expose the FastAPI app on port 8000
EXPOSE 8000

# Command to run the FastAPI app with Uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[
{
"input": "شنو هي الجوائز اللي خاص تلاقيها في مراكش من اجل عشاق التاريخ؟",
"output": "لي حببو التاريخ فالمراكش خاصهم بزيارة القبور السعدية باش يتعرفوا على التاريخ الملكي، قصر باهيا بسبب الهندسة المعمارية المعقدة، ومسجد كوتوبيا، أكبر مسجد فالمراكش."
},
{
"input": "أنا كايخطط باش نزور الدار البيضاء فمايو. شنو هي الأنشطة الفريدة لي فيتوجب عليا نحاولها؟",
"output": "فمايو، تمتع بمشي على طول قرية عين دياب، استكشف مركز التسوق المغرب لأكواريم فريدة وأسواق فاخرة، وتناول العشاء في مقهى ريك، مستوحى من الفيلم كازابلانكا."
},
{
"input": "شنو هي أحسن الأماكن للزيارة فيس لتجربة ثقافية؟",
"output": "فيس، قم بزيارة مدرسة الأعتارين لأعمالها البلاطية المذهلة، وزر المصانع لتعلم عن صنع الجلد، وتتجول في الصوكات النابضة بالحياة في مدينة فيس، موقع التراث العالمي لليونسكو."
},
{
"input": "شنو هي الأنشطة الأهم اللي يمكن القيام بها في إساويرا بالنسبة لمتساعدي المغامرات؟",
"output": "اللي كايبغوا المغامرات في إساويرا يمكن ليهم يجراوو كايت سيرف على الشواطئ اللي فيها الرياح، ويقومو بركوب الخيل على طول الساحل، ويقومو يكتشفون الكثبان المحيطة على دراجة رباعية."
},
{
"input": "شنو شي حاجة فريدة تقدر تعمل فرباط مع الاطفال؟",
"output": "مع الاطفال في الرباط زيارة حديقة حيوان الرباط باش تشوف الحيوانات الغريبة، واستمتع بالخروج لخروج لخروج في البحرية البحرية بورغريغ، واستكشف متحف العلوم للأطفال لتحديد المعارض التفاعلية."
},
{
"input": "شنو هي التلاتة الأعمال الأهم اللي يمكن القيام بها فطنجة ف سبتمبر؟",
"output": "فسبطمبر، زورو فوارة كيب سبارتل لتتمتع بمناظر ساحلية رائعة، واستكشفوا كهوف هرقل، واخدوا جولة على طول قصبة طنجة باش تتمتعوا بالثقافة المحلية الحيوية."
},
{
"input": "شنو هي أحسن مناطق راقية في شيفشاوين؟",
"output": "فشيفتشاوين، تمشي لشارب أكشور لتفرار هادئ، وزر نقطة راس الماما، واستكشف الشوارع الزرقاء بعيدة عن الساحة الرئيسية لتجربة هادئة."
},
{
"input": "بغيت نزور أغادير. شنو هي أحسن نشاطات صحية باش نجربو؟",
"output": "فاغادير، راحة مع تجربة حمام تقليدية، خذي دروس يوغا في ملجأ على الشاطئ، وزيارة كروكوبارك ليوم هادئ محاط بالحدائق البارزة والتماسيح."
},
{
"input": "شنو هي التجارب الغذائية المفضلة باش نتجربها ف مراكش؟",
"output": "فالمراكش، تناول العشاء في مطعم على السطح في المدينة للتجينين، وزر دار ياكوت لتناول وجبة مغربية فخمة، وتجرب الأكل الشارعي مثل المسمين والحريرة في ساحة الجماعة الفناية."
},
{
"input": "شنو هي البلايص اللي خاصنا نشوفوهم فالمكنيس فرحلة ليوم واحد؟",
"output": "فرحلة ليوم واحد في مكنس، زيارة باب منصور البوابة، ومؤسومة مولاي إسماعيل، والخرابات الرومانية فولوبليس الواقعة خارج المدينة."
},
{
"input": "شنو هي أحسن أماكن لمشاهدة النجوم في ميرزوغا؟",
"output": "ميرزوجا كاتقدم فرصا رائعة لمشاهدة النجوم. حجز ليلا في معسكر صحراوي بربري، تسلق لرفع كتل الرغ شيبي باش تلاقي منظر صافي، أو تمتع بمشاهدة النجوم أثناء رحلة الجمال."
},
{
"input": "شنو هي أكثر المناظر الخلابة في دخلا؟",
"output": "فداخلا زيارة جزيرة التنين لمشاهدة مناظر بانورامية، واستكشاف الأستنة البيضاء لمشاهدة صحراء تلتقي بالمحيط، واستمتاع بمشاهدة البحيرة أثناء ركوب الطيور."
},
{
"input": "شنو خاصني نديرو أولوية فاش نتزور أورزازات نهار واحد؟",
"output": "فنهار واحد زيارة بيت بيت بن هادو للناظر التاريخية الرائعة، وجولة في ستوديوات الأطلس السينمائية، وتفقد بيت تاووريت في وسط المدينة."
},
{
"input": "شنو هي الأماكن المفضلة للتنزه على الإفران؟",
"output": "قريب من إفران، تمشي في غابة الأرز لتشوف القرود البربري، واستكشف مسارات منطقة التزلج في ميشليفن، وزور بحيرة داييت أوا لتتمتع بمناظر خلابة وسباقات هادئة."
},
{
"input": "شنو هي الأماكن اللي خاص تزورها في تيتوان لمحبو الفن؟",
"output": "محبي الفن يجب عليهم زيارة المعهد الوطني للفنون الجميلة، واستكشاف ورش العمل الحرفية في المدينة، واستكشاف المتحف الأثري لمعارض التاريخ والثقافة المحلية."
},
{
"input": "شنو أحسن شي شي نقدر نفعله فاوجدا ف الربيع؟",
"output": "فربيعا، إستمتع بالزهور المزهرة فبارك لالا عايشا، وزر المسجد الكبير لتجربة روحية، واستكشف واحة سدي يحيى لتتراجع هادئة."
},
{
"input": "شنو هي التجارب المفضلة في أسيلا للمصورين؟",
"output": "فالصور غادي يحبون يلتقطو الجدران الملونة ديال مدينة آسي"
}
]

Large diffs are not rendered by default.

Loading