Patrick changed the structure #10
					 2 changed files with 30 additions and 24 deletions
				
			
		|  | @ -1,20 +1,24 @@ | |||
| from api import API | ||||
| 
 | ||||
| chat1 = API() | ||||
| 
 | ||||
| while True: | ||||
|     print("") | ||||
|     print("Which AI Model do you want to use? Write as a Number (1-5)") | ||||
|     model_input = input() | ||||
|     model = int(model_input) | ||||
|     if model <=0 or model > 5: | ||||
|         print("ungültiges Modell") | ||||
|         continue | ||||
|     while True: | ||||
|         print("") | ||||
|         print("Ask a question") | ||||
|         inputText = input () | ||||
|         if inputText == "change": | ||||
|             break | ||||
|         outputText = chat1.send_message(inputText, model) | ||||
|         print(outputText) | ||||
| class CLIChat: | ||||
|     @staticmethod | ||||
|     def chat(): | ||||
|         chat1 = API() | ||||
| 
 | ||||
|         while True: | ||||
|             print("") | ||||
|             print("Which AI Model do you want to use? Write as a Number (1-5).") | ||||
|             model_input = input() | ||||
|             model = int(model_input) | ||||
|             if model <= 0 or model > 5: | ||||
|                 print("Invalid model.") | ||||
|                 continue | ||||
|             while True: | ||||
|                 print("") | ||||
|                 print("Ask a question") | ||||
|                 input_text = input() | ||||
|                 if input_text == "change": | ||||
|                     break | ||||
|                 output_text = chat1.send_message(input_text, model) | ||||
|                 print(output_text) | ||||
|  |  | |||
|  | @ -1,12 +1,14 @@ | |||
| from flask import Flask, send_from_directory | ||||
| 
 | ||||
| app = Flask(__name__) | ||||
| 
 | ||||
| class WebHost: | ||||
|     @staticmethod | ||||
|     def main_page(): | ||||
|         app = Flask(__name__) | ||||
| 
 | ||||
| @app.route('/') | ||||
| def index(): | ||||
|     return app.send_static_file('index.html') | ||||
|         @app.route('/') | ||||
|         def index(): | ||||
|             return app.send_static_file('index.html') | ||||
| 
 | ||||
| 
 | ||||
| if __name__ == '__main__': | ||||
|     app.run(debug=True) | ||||
|         if __name__ == '__main__': | ||||
|             app.run(debug=True) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue